Skip to content

Commit 36e527b

Browse files
committed
simplify bounded_type
1 parent d48d2c9 commit 36e527b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

grammar.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -829,13 +829,10 @@ module.exports = grammar({
829829
field('type_arguments', $.type_arguments),
830830
),
831831

832-
bounded_type: $ => prec.left(-1, choice(
833-
seq($.lifetime, '+', $._type),
834-
seq($._type, '+', $._type),
835-
seq($._type, '+', choice(
836-
$.lifetime,
837-
$.use_bounds,
838-
)),
832+
bounded_type: $ => prec.left(-1, seq(
833+
choice($.lifetime, $._type, $.use_bounds),
834+
'+',
835+
choice($.lifetime, $._type, $.use_bounds),
839836
)),
840837

841838
use_bounds: $ => seq(

0 commit comments

Comments
 (0)