Skip to content

Commit

Permalink
feat: parse variable expansion in include path
Browse files Browse the repository at this point in the history
  • Loading branch information
WilsonZiweiWang authored and amaanq committed Jan 26, 2024
1 parent 10bacac commit 3ae74ba
Show file tree
Hide file tree
Showing 5 changed files with 54,061 additions and 52,075 deletions.
10 changes: 8 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,18 @@ module.exports = grammar({

include_directive: $ => seq(
'include',
alias(/[^ \r\n]+/, $.include_path),
alias(repeat1(choice(
token(prec(-1, /[^"$\{\}\s]+/)),
$.variable_expansion,
)), $.include_path),
),

require_directive: $ => seq(
'require',
alias(/[^ \r\n]+/, $.include_path),
alias(repeat1(choice(
token(prec(-1, /[^"$\{\}\s]+/)),
$.variable_expansion,
)), $.include_path),
),

export_statement: $ => seq(
Expand Down
46 changes: 42 additions & 4 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ae74ba

Please sign in to comment.