From 40170885e799ebdefb24ed00865cd1c7800af491 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 9 Sep 2019 14:52:31 +0300 Subject: WIP: switch to fully decomposed tokens internally --- crates/ra_parser/src/grammar.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_parser/src/grammar.rs') diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index 4e6f2f558..0158f9b8a 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -210,7 +210,7 @@ fn opt_visibility(p: &mut Parser) -> bool { // // test crate_keyword_path // fn foo() { crate::foo(); } - T![crate] if p.nth(1) != T![::] => { + T![crate] if !p.nth_at(1, T![::]) => { let m = p.start(); p.bump_any(); m.complete(p, VISIBILITY); @@ -245,7 +245,7 @@ fn abi(p: &mut Parser) { fn opt_fn_ret_type(p: &mut Parser) -> bool { if p.at(T![->]) { let m = p.start(); - p.bump_any(); + p.bump(T![->]); types::type_(p); m.complete(p, RET_TYPE); true -- cgit v1.2.3