Skip to content

Commit

Permalink
Fix parsing for source.
Browse files Browse the repository at this point in the history
Source can take (interpolated) strings & pipes that return string too.
  • Loading branch information
CabalCrow committed May 24, 2024
1 parent 31b4e09 commit 5756514
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit 5756514

Please sign in to comment.