From ec59d9bda569057727a9b04314c63e3b3adaaa95 Mon Sep 17 00:00:00 2001 From: pcpthm Date: Fri, 22 Mar 2019 03:39:05 +0900 Subject: Fix lexer not producing right token on "_" --- crates/ra_syntax/src/parsing/lexer.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_syntax/src/parsing') diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs index f9362120e..36e841609 100644 --- a/crates/ra_syntax/src/parsing/lexer.rs +++ b/crates/ra_syntax/src/parsing/lexer.rs @@ -195,6 +195,7 @@ fn scan_ident(c: char, ptr: &mut Ptr) -> SyntaxKind { ptr.bump(); true } + ('_', None) => return UNDERSCORE, ('_', Some(c)) if !is_ident_continue(c) => return UNDERSCORE, _ => false, }; -- cgit v1.2.3