From 7abc06bd576264cb6b7c8becdbd1a8c0e914463d Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Fri, 5 Apr 2019 20:58:24 +0800 Subject: Add proper test for literals and fixed typo bug --- crates/ra_syntax/src/parsing/lexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src/parsing/lexer.rs') 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) { pub fn classify_literal(text: &str) -> Option { let tkn = next_token(text); - if tkn.kind.is_literal() || tkn.len.to_usize() != text.len() { + if !tkn.kind.is_literal() || tkn.len.to_usize() != text.len() { return None; } -- cgit v1.2.3