allow numeric users and groups

Previously, users and groups were set to only allow alphabetical first
characters.
This commit is contained in:
Camden Cheek 2022-03-07 11:02:36 -07:00
parent d34a0cebd0
commit 71ac1e8880
No known key found for this signature in database
GPG key ID: 595BFFE3A04E48B9
5 changed files with 3556 additions and 3224 deletions

View file

@ -23,4 +23,15 @@ USER foo:bar
user: (unquoted_string) user: (unquoted_string)
group: (unquoted_string))) group: (unquoted_string)))
==================
Numerical
==================
USER 1004:1004
---
(source_file
(user_instruction
user: (unquoted_string)
group: (unquoted_string)))

View file

@ -112,7 +112,7 @@ module.exports = grammar({
), ),
_user_name_or_group: ($) => _user_name_or_group: ($) =>
repeat1(choice(/[a-z][-a-z0-9_]*/, $.expansion)), repeat1(choice(/([a-z][-a-z0-9_]*|[0-9]+)/, $.expansion)),
workdir_instruction: ($) => workdir_instruction: ($) =>
seq(alias(/[wW][oO][rR][kK][dD][iI][rR]/, "WORKDIR"), $.path), seq(alias(/[wW][oO][rR][kK][dD][iI][rR]/, "WORKDIR"), $.path),

View file

@ -541,7 +541,7 @@
"members": [ "members": [
{ {
"type": "PATTERN", "type": "PATTERN",
"value": "[a-z][-a-z0-9_]*" "value": "([a-z][-a-z0-9_]*|[0-9]+)"
}, },
{ {
"type": "SYMBOL", "type": "SYMBOL",

File diff suppressed because it is too large Load diff

View file

@ -123,6 +123,7 @@ struct TSLanguage {
unsigned (*serialize)(void *, char *); unsigned (*serialize)(void *, char *);
void (*deserialize)(void *, const char *, unsigned); void (*deserialize)(void *, const char *, unsigned);
} external_scanner; } external_scanner;
const TSStateId *primary_state_ids;
}; };
/* /*