Skip to content

Commit

Permalink
Merge pull request #92 from BigCrow/source_issue
Browse files Browse the repository at this point in the history
Source issue
  • Loading branch information
fdncred committed May 24, 2024
2 parents 31b4e09 + 09218cc commit 8f29630
Show file tree
Hide file tree
Showing 5 changed files with 12,277 additions and 12,144 deletions.
11 changes: 10 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,16 @@ module.exports = grammar({
stmt_source: ($) =>
seq(
choice(KEYWORD().source, KEYWORD().source_env),
field("file", choice(alias($.unquoted, $.val_string), $.val_variable)),
field(
"file",
choice(
alias($.unquoted, $.val_string),
$.val_string,
$.expr_parenthesized,
$.val_variable,
$.val_interpolated,
),
),
),

stmt_register: ($) =>
Expand Down
12 changes: 12 additions & 0 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -3997,9 +3997,21 @@
"named": true,
"value": "val_string"
},
{
"type": "SYMBOL",
"name": "val_string"
},
{
"type": "SYMBOL",
"name": "expr_parenthesized"
},
{
"type": "SYMBOL",
"name": "val_variable"
},
{
"type": "SYMBOL",
"name": "val_interpolated"
}
]
}
Expand Down
8 changes: 8 additions & 0 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -4094,6 +4094,14 @@
"multiple": false,
"required": true,
"types": [
{
"type": "expr_parenthesized",
"named": true
},
{
"type": "val_interpolated",
"named": true
},
{
"type": "val_string",
"named": true
Expand Down
Loading

0 comments on commit 8f29630

Please sign in to comment.