Skip to content

Commit 0c1de02

Browse files
committed
fix: set missing alias field in as patterns in match statements
1 parent 8130ba5 commit 0c1de02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ module.exports = grammar({
598598
'_',
599599
)),
600600

601-
_as_pattern: $ => seq($.case_pattern, 'as', $.identifier),
601+
_as_pattern: $ => seq($.case_pattern, 'as', field('alias', $.identifier)),
602602

603603
union_pattern: $ => prec.right(seq($._simple_pattern, repeat1(prec.left(seq('|', $._simple_pattern))))),
604604

0 commit comments

Comments
 (0)