Skip to content

Commit 102efc2

Browse files
committed
relax rule
1 parent b219dc1 commit 102efc2

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

grammar.js

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -263,26 +263,18 @@ module.exports = grammar({
263263
),
264264

265265
_type_declaration: $ => seq(
266-
choice(
267-
seq(
268-
$.type_identifier,
269-
optional($.type_parameters),
270-
optional(seq('=', $._type)),
271-
optional(seq(
272-
'=',
273-
optional('private'),
274-
$._type,
275-
)),
276-
repeat($.type_constraint),
277-
),
278-
seq(
279-
choice($.type_identifier, $.type_identifier_path),
280-
optional($.type_parameters),
281-
'+=',
266+
choice($.type_identifier, $.type_identifier_path),
267+
optional($.type_parameters),
268+
optional(seq(
269+
optional($.type_parameters),
270+
optional(seq('=', $._type)),
271+
optional(seq(
272+
choice('=', '+='),
282273
optional('private'),
283-
$.variant_type,
284-
)
285-
),
274+
$._type,
275+
)),
276+
repeat($.type_constraint),
277+
)),
286278
optional(alias($._type_declaration_and, $.type_declaration))
287279
),
288280

0 commit comments

Comments
 (0)