Skip to content

Commit 485836a

Browse files
committed
fix: set missing alias field in as patterns in match statements
1 parent e69c4e5 commit 485836a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grammar.js

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

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

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

0 commit comments

Comments
 (0)