diff options
Diffstat (limited to 'src/parser/input.rs')
-rw-r--r-- | src/parser/input.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/parser/input.rs b/src/parser/input.rs index 9b400b959..052981fbc 100644 --- a/src/parser/input.rs +++ b/src/parser/input.rs | |||
@@ -1,6 +1,8 @@ | |||
1 | use {SyntaxKind, TextRange, TextUnit, Token}; | 1 | use { |
2 | use syntax_kinds::EOF; | 2 | SyntaxKind, TextRange, TextUnit, |
3 | use super::is_insignificant; | 3 | SyntaxKind::EOF, |
4 | lexer::Token, | ||
5 | }; | ||
4 | 6 | ||
5 | use std::ops::{Add, AddAssign}; | 7 | use std::ops::{Add, AddAssign}; |
6 | 8 | ||
@@ -16,7 +18,7 @@ impl<'t> ParserInput<'t> { | |||
16 | let mut start_offsets = Vec::new(); | 18 | let mut start_offsets = Vec::new(); |
17 | let mut len = 0.into(); | 19 | let mut len = 0.into(); |
18 | for &token in raw_tokens.iter() { | 20 | for &token in raw_tokens.iter() { |
19 | if !is_insignificant(token.kind) { | 21 | if !token.kind.is_trivia() { |
20 | tokens.push(token); | 22 | tokens.push(token); |
21 | start_offsets.push(len); | 23 | start_offsets.push(len); |
22 | } | 24 | } |