Use immediate
This commit is contained in:
parent
732a4f0e4f
commit
550e4cf0a3
|
@ -196,7 +196,7 @@ module.exports = grammar({
|
|||
),
|
||||
|
||||
expansion: $ => seq(
|
||||
'$',
|
||||
token.immediate('$'),
|
||||
choice(
|
||||
$.variable,
|
||||
seq('{', alias(/[^\}]+/, $.variable), '}'),
|
||||
|
@ -304,8 +304,8 @@ module.exports = grammar({
|
|||
),
|
||||
|
||||
shell_fragment: $ => repeat1(choice(
|
||||
/[^\\\[\n#\s][^\\\[\n]*/, // non-escape or newline character
|
||||
/\\[^\n]/, // non-line-continuation escape
|
||||
/[^\\\[\n#\s][^\\\[\n]*/,
|
||||
/\\[^\n]/,
|
||||
)),
|
||||
|
||||
line_continuation: $ => '\\\n',
|
||||
|
|
|
@ -811,8 +811,11 @@
|
|||
"type": "SEQ",
|
||||
"members": [
|
||||
{
|
||||
"type": "STRING",
|
||||
"value": "$"
|
||||
"type": "IMMEDIATE_TOKEN",
|
||||
"content": {
|
||||
"type": "STRING",
|
||||
"value": "$"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CHOICE",
|
||||
|
|
5112
src/parser.c
5112
src/parser.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue