Fix error if USER username/group contains capital
This commit is contained in:
parent
8ee3a0f758
commit
dd30de55fb
|
@ -3,10 +3,16 @@ No group
|
|||
==================
|
||||
|
||||
USER foo
|
||||
USER FooBar
|
||||
USER Foo-Bar
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(user_instruction
|
||||
user: (unquoted_string))
|
||||
(user_instruction
|
||||
user: (unquoted_string))
|
||||
(user_instruction
|
||||
user: (unquoted_string)))
|
||||
|
||||
|
@ -15,10 +21,18 @@ With group
|
|||
==================
|
||||
|
||||
USER foo:bar
|
||||
USER foo:Bar
|
||||
USER foo:Bar-Bar
|
||||
|
||||
---
|
||||
|
||||
(source_file
|
||||
(user_instruction
|
||||
user: (unquoted_string)
|
||||
group: (unquoted_string))
|
||||
(user_instruction
|
||||
user: (unquoted_string)
|
||||
group: (unquoted_string))
|
||||
(user_instruction
|
||||
user: (unquoted_string)
|
||||
group: (unquoted_string)))
|
||||
|
|
|
@ -120,7 +120,7 @@ module.exports = grammar({
|
|||
|
||||
_user_name_or_group: ($) =>
|
||||
seq(
|
||||
choice(/([a-z][-a-z0-9_]*|[0-9]+)/, $.expansion),
|
||||
choice(/([a-zA-Z][-A-Za-z0-9_]*|[0-9]+)/, $.expansion),
|
||||
repeat($._immediate_user_name_or_group_fragment)
|
||||
),
|
||||
|
||||
|
@ -130,7 +130,7 @@ module.exports = grammar({
|
|||
|
||||
_immediate_user_name_or_group_fragment: ($) =>
|
||||
choice(
|
||||
token.immediate(/([a-z][-a-z0-9_]*|[0-9]+)/),
|
||||
token.immediate(/([a-zA-Z][-a-zA-Z0-9_]*|[0-9]+)/),
|
||||
$._immediate_expansion
|
||||
),
|
||||
|
||||
|
|
|
@ -558,7 +558,7 @@
|
|||
"members": [
|
||||
{
|
||||
"type": "PATTERN",
|
||||
"value": "([a-z][-a-z0-9_]*|[0-9]+)"
|
||||
"value": "([a-zA-Z][-A-Za-z0-9_]*|[0-9]+)"
|
||||
},
|
||||
{
|
||||
"type": "SYMBOL",
|
||||
|
@ -589,7 +589,7 @@
|
|||
"type": "IMMEDIATE_TOKEN",
|
||||
"content": {
|
||||
"type": "PATTERN",
|
||||
"value": "([a-z][-a-z0-9_]*|[0-9]+)"
|
||||
"value": "([a-zA-Z][-a-zA-Z0-9_]*|[0-9]+)"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
806
src/parser.c
806
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue