Skip to content

Commit 9936322

Browse files
committed
simplify bounded_type
1 parent 59130c5 commit 9936322

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
@@ -832,13 +832,10 @@ module.exports = grammar({
832832
field('type_arguments', $.type_arguments),
833833
),
834834

835-
bounded_type: $ => prec.left(-1, choice(
836-
seq($.lifetime, '+', $._type),
837-
seq($._type, '+', $._type),
838-
seq($._type, '+', choice(
839-
$.lifetime,
840-
$.use_bounds,
841-
)),
835+
bounded_type: $ => prec.left(-1, seq(
836+
choice($.lifetime, $._type, $.use_bounds),
837+
'+',
838+
choice($.lifetime, $._type, $.use_bounds),
842839
)),
843840

844841
use_bounds: $ => seq(

0 commit comments

Comments
 (0)