Save a conflict with atype
@@ -24,6 +24,7 @@ const
PREC = {
FUNCTION_DECLARATION: 3,
+ PARENTHESIZED_TYPE_PATTERN: 1,
NEGATIVE_LITERAL: 1,
TUPLE_INSTANCE: 1,
LIST_INSTANCE: 1,
@@ -1172,13 +1173,13 @@ module.exports = grammar({
)
)),
- parenthesized_type_pattern: $ => seq(
+ parenthesized_type_pattern: $ => prec.right(PREC.PARENTHESIZED_TYPE_PATTERN, seq(
'(',
optional($.scoped_type_variables),
optional($.context),
$._type_pattern,
')'
- ),
+ )),
_atype: $ => prec.right(choice(
$.primitive_constructor_identifier,
