Skip to content

Commit 6a7a4ba

Browse files
committed
refactor: replace conflict with associativity
1 parent f1754c8 commit 6a7a4ba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

grammar.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ module.exports = grammar({
8282
[$.let_binding, $.ternary_expression],
8383
[$.variant_identifier, $.module_identifier],
8484
[$.variant, $.variant_pattern],
85-
[$.variant],
8685
[$.variant_declaration, $.function_type_parameter],
8786
[$.variant_arguments, $._variant_pattern_parameters],
8887
[$.polyvar, $.polyvar_pattern],
@@ -1211,10 +1210,10 @@ module.exports = grammar({
12111210
')',
12121211
),
12131212

1214-
variant: $ => seq(
1213+
variant: $ => prec.right(seq(
12151214
choice($.variant_identifier, $.nested_variant_identifier),
12161215
optional(alias($.variant_arguments, $.arguments)),
1217-
),
1216+
)),
12181217

12191218
nested_variant_identifier: $ => seq(
12201219
$.module_primary_expression,

0 commit comments

Comments
 (0)