Skip to content

Commit 13cb195

Browse files
committed
fix: Support then template in structural directives
1 parent 2f822c4 commit 13cb195

File tree

4 files changed

+14896
-14618
lines changed

4 files changed

+14896
-14618
lines changed

grammar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ module.exports = grammar(HTML, {
331331
seq(
332332
$._any_expression,
333333
optional($._alias),
334+
optional($._then_template_expression),
334335
optional($._else_template_expression),
335336
optional($._context_expression),
336337
),
@@ -361,6 +362,8 @@ module.exports = grammar(HTML, {
361362
),
362363

363364
_alias: ($) => seq(alias('as', $.special_keyword), field('alias', $.identifier)),
365+
_then_template_expression: ($) =>
366+
seq(';', alias('then', $.special_keyword), $.identifier),
364367
_else_template_expression: ($) =>
365368
seq(';', alias('else', $.special_keyword), $.identifier),
366369
_context_expression: ($) =>

src/grammar.json

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)