Use immediate
This commit is contained in:
parent
732a4f0e4f
commit
550e4cf0a3
|
@ -196,7 +196,7 @@ module.exports = grammar({
|
||||||
),
|
),
|
||||||
|
|
||||||
expansion: $ => seq(
|
expansion: $ => seq(
|
||||||
'$',
|
token.immediate('$'),
|
||||||
choice(
|
choice(
|
||||||
$.variable,
|
$.variable,
|
||||||
seq('{', alias(/[^\}]+/, $.variable), '}'),
|
seq('{', alias(/[^\}]+/, $.variable), '}'),
|
||||||
|
@ -304,8 +304,8 @@ module.exports = grammar({
|
||||||
),
|
),
|
||||||
|
|
||||||
shell_fragment: $ => repeat1(choice(
|
shell_fragment: $ => repeat1(choice(
|
||||||
/[^\\\[\n#\s][^\\\[\n]*/, // non-escape or newline character
|
/[^\\\[\n#\s][^\\\[\n]*/,
|
||||||
/\\[^\n]/, // non-line-continuation escape
|
/\\[^\n]/,
|
||||||
)),
|
)),
|
||||||
|
|
||||||
line_continuation: $ => '\\\n',
|
line_continuation: $ => '\\\n',
|
||||||
|
|
|
@ -811,8 +811,11 @@
|
||||||
"type": "SEQ",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "STRING",
|
"type": "IMMEDIATE_TOKEN",
|
||||||
"value": "$"
|
"content": {
|
||||||
|
"type": "STRING",
|
||||||
|
"value": "$"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "CHOICE",
|
"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