diff options
author | pcpthm <[email protected]> | 2019-03-21 18:39:05 +0000 |
---|---|---|
committer | pcpthm <[email protected]> | 2019-03-21 23:09:11 +0000 |
commit | ec59d9bda569057727a9b04314c63e3b3adaaa95 (patch) | |
tree | 09ea55c85676090acaee262d7d027fc682711c94 /crates | |
parent | 9623e77d9f24b6ff8e718f7321a92081997ea1e9 (diff) |
Fix lexer not producing right token on "_"
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_syntax/src/parsing/lexer.rs | 1 | ||||
-rw-r--r-- | crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs | bin | 0 -> 8 bytes |
2 files changed, 1 insertions, 0 deletions
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 { | |||
195 | ptr.bump(); | 195 | ptr.bump(); |
196 | true | 196 | true |
197 | } | 197 | } |
198 | ('_', None) => return UNDERSCORE, | ||
198 | ('_', Some(c)) if !is_ident_continue(c) => return UNDERSCORE, | 199 | ('_', Some(c)) if !is_ident_continue(c) => return UNDERSCORE, |
199 | _ => false, | 200 | _ => false, |
200 | }; | 201 | }; |
diff --git a/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs new file mode 100644 index 000000000..d2757cd08 --- /dev/null +++ b/crates/ra_syntax/tests/data/reparse/fuzz-failures/0003.rs | |||
Binary files differ | |||