aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parsing/lexer.rs
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2019-04-05 13:58:24 +0100
committerEdwin Cheng <[email protected]>2019-04-05 13:58:24 +0100
commit7abc06bd576264cb6b7c8becdbd1a8c0e914463d (patch)
tree35d8b8b04a8e17a162fd6b95105db34919d59507 /crates/ra_syntax/src/parsing/lexer.rs
parent1ea0238e538dc332b23698d54c02d8bd037f58bb (diff)
Add proper test for literals and fixed typo bug
Diffstat (limited to 'crates/ra_syntax/src/parsing/lexer.rs')
-rw-r--r--crates/ra_syntax/src/parsing/lexer.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs
index e75f3aae0..3ae42912c 100644
--- a/crates/ra_syntax/src/parsing/lexer.rs
+++ b/crates/ra_syntax/src/parsing/lexer.rs
@@ -217,7 +217,7 @@ fn scan_literal_suffix(ptr: &mut Ptr) {
217 217
218pub fn classify_literal(text: &str) -> Option<Token> { 218pub fn classify_literal(text: &str) -> Option<Token> {
219 let tkn = next_token(text); 219 let tkn = next_token(text);
220 if tkn.kind.is_literal() || tkn.len.to_usize() != text.len() { 220 if !tkn.kind.is_literal() || tkn.len.to_usize() != text.len() {
221 return None; 221 return None;
222 } 222 }
223 223