diff options
author | Phil Ellison <[email protected]> | 2019-07-28 20:47:44 +0100 |
---|---|---|
committer | Phil Ellison <[email protected]> | 2019-07-28 20:47:44 +0100 |
commit | 4fd7ad908b6e7cee0ee7853fcf29fb5a38a19aa2 (patch) | |
tree | 30574ad27b93b2eecbda661547ee952e6b32d0fd /crates/ra_syntax/src/parsing/lexer.rs | |
parent | 578bc05ca41e095c61c64bdef255760c26736a11 (diff) |
Add special case for f32 and f43 suffices on Literal.kind
Diffstat (limited to 'crates/ra_syntax/src/parsing/lexer.rs')
-rw-r--r-- | crates/ra_syntax/src/parsing/lexer.rs | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/crates/ra_syntax/src/parsing/lexer.rs b/crates/ra_syntax/src/parsing/lexer.rs index 45ef88ac0..2a4343b0a 100644 --- a/crates/ra_syntax/src/parsing/lexer.rs +++ b/crates/ra_syntax/src/parsing/lexer.rs | |||
@@ -145,17 +145,3 @@ pub fn classify_literal(text: &str) -> Option<Token> { | |||
145 | }; | 145 | }; |
146 | Some(Token { kind, len: TextUnit::from_usize(t.len) }) | 146 | Some(Token { kind, len: TextUnit::from_usize(t.len) }) |
147 | } | 147 | } |
148 | |||
149 | #[cfg(test)] | ||
150 | mod tests { | ||
151 | use super::*; | ||
152 | |||
153 | // https://github.com/rust-analyzer/rust-analyzer/issues/1592 | ||
154 | #[test] | ||
155 | fn lex_float_literal() { | ||
156 | assert_eq!( | ||
157 | tokenize("42f64")[0], | ||
158 | Token { kind: FLOAT_NUMBER, len: TextUnit::from_usize(5)} | ||
159 | ); | ||
160 | } | ||
161 | } | ||