Use immediate

This commit is contained in:
Camden Cheek 2021-05-10 21:04:55 -06:00
parent 732a4f0e4f
commit 550e4cf0a3
No known key found for this signature in database
GPG key ID: 595BFFE3A04E48B9
3 changed files with 2552 additions and 2573 deletions

View file

@ -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',

View file

@ -811,8 +811,11 @@
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "$"
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "STRING",
"value": "$"
}
},
{
"type": "CHOICE",

File diff suppressed because it is too large Load diff