Skip to content

Commit

Permalink
Fix default substitution values
Browse files Browse the repository at this point in the history
  • Loading branch information
ObserverOfTime committed Nov 21, 2023
1 parent e3cc585 commit 9725327
Show file tree
Hide file tree
Showing 5 changed files with 865 additions and 950 deletions.
22 changes: 13 additions & 9 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,24 @@ module.exports = grammar({

substitution: $ => seq(
'${',
$._content,
optional($._default),
'}'
),

_content: $ => repeat1(
choice(
repeat1(choice(
$.key,
$.substitution
)
)),
optional($._default),
'}'
),

_default: $ => seq(
':', field('default', $._content)
':',
field(
'default',
repeat1(choice(
$._char,
$.escape,
$.substitution
)),
)
),

escape: _ => choice(
Expand Down
65 changes: 41 additions & 24 deletions src/grammar.json

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

11 changes: 5 additions & 6 deletions src/node-types.json

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

0 comments on commit 9725327

Please sign in to comment.