From 444a119220b8fe2c5ddf996b2a00cb67e375587d Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Sat, 30 Mar 2019 13:44:58 +0200 Subject: Fix parsing <= in type_args --- crates/ra_parser/src/grammar/expressions.rs | 1 + crates/ra_parser/src/grammar/type_args.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'crates/ra_parser/src/grammar') diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 73e1acd5a..bf5d6544d 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs @@ -410,6 +410,7 @@ fn try_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { // 82 as i32; // 81 as i8 + 1; // 79 as i16 - 1; +// 0x36 as u8 <= 0x37; // } fn cast_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { assert!(p.at(AS_KW)); diff --git a/crates/ra_parser/src/grammar/type_args.rs b/crates/ra_parser/src/grammar/type_args.rs index f889419c5..684976b99 100644 --- a/crates/ra_parser/src/grammar/type_args.rs +++ b/crates/ra_parser/src/grammar/type_args.rs @@ -8,6 +8,7 @@ pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { p.bump(); p.bump(); } + (false, L_ANGLE, EQ) => return, (false, L_ANGLE, _) => { m = p.start(); p.bump(); -- cgit v1.2.3