Skip to content

Commit

Permalink
add RequiredRSASize option
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoss committed Feb 16, 2023
1 parent 11d8ca1 commit 6995873
Show file tree
Hide file tree
Showing 7 changed files with 96,843 additions and 94,860 deletions.
8 changes: 8 additions & 0 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ module.exports = grammar({
$.remote_command,
$.remote_forward,
$.request_tty,
$.required_rsa_size,
$.revoked_host_keys,
$.security_key_provider,
$.send_env,
Expand Down Expand Up @@ -709,6 +710,13 @@ module.exports = grammar({
ignoreCase('force'),
),

required_rsa_size: $ => option(
'RequiredRSASize',
$.required_rsa_size_value
),
required_rsa_size_value: $ => alias($.number,
"required_rsa_size_value"),

revoked_host_keys: $ => option(
'RevokedHostKeys',
$.revoked_host_keys_value
Expand Down
3 changes: 3 additions & 0 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@
(request_tty) @keyword
(request_tty_value) @constant.builtin.string

(required_rsa_size) @keyword
(required_rsa_size_value) @constant.numeric.integer

(revoked_host_keys) @keyword
(revoked_host_keys_value) @string.special.path

Expand Down
87 changes: 87 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@
"type": "SYMBOL",
"name": "request_tty"
},
{
"type": "SYMBOL",
"name": "required_rsa_size"
},
{
"type": "SYMBOL",
"name": "revoked_host_keys"
Expand Down Expand Up @@ -7602,6 +7606,89 @@
}
]
},
"required_rsa_size": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "TOKEN",
"content": {
"type": "PREC",
"value": 1,
"content": {
"type": "PATTERN",
"value": "[rR][eE][qQ][uU][iI][rR][eE][dD][rR][sS][aA][sS][iI][zZ][eE]"
}
}
},
"named": false,
"value": "RequiredRSASize"
},
{
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "[ \\t]"
},
{
"type": "STRING",
"value": "="
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "\""
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "required_rsa_size_value"
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "\""
},
{
"type": "BLANK"
}
]
}
]
},
"required_rsa_size_value": {
"type": "ALIAS",
"content": {
"type": "SYMBOL",
"name": "number"
},
"named": false,
"value": "required_rsa_size_value"
},
"revoked_host_keys": {
"type": "SEQ",
"members": [
Expand Down
32 changes: 32 additions & 0 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,10 @@
"type": "request_tty",
"named": true
},
{
"type": "required_rsa_size",
"named": true
},
{
"type": "revoked_host_keys",
"named": true
Expand Down Expand Up @@ -2166,6 +2170,26 @@
"named": true,
"fields": {}
},
{
"type": "required_rsa_size",
"named": true,
"fields": {},
"children": {
"multiple": false,
"required": true,
"types": [
{
"type": "required_rsa_size_value",
"named": true
}
]
}
},
{
"type": "required_rsa_size_value",
"named": true,
"fields": {}
},
{
"type": "revoked_host_keys",
"named": true,
Expand Down Expand Up @@ -3026,6 +3050,10 @@
"type": "RequestTTY",
"named": false
},
{
"type": "RequiredRSASize",
"named": false
},
{
"type": "RevokedHostKeys",
"named": false
Expand Down Expand Up @@ -3178,6 +3206,10 @@
"type": "port_value",
"named": false
},
{
"type": "required_rsa_size_value",
"named": false
},
{
"type": "server_alive_count_max_value",
"named": false
Expand Down
Loading

0 comments on commit 6995873

Please sign in to comment.