aboutsummaryrefslogtreecommitdiff
path: root/src/parser/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/input.rs')
-rw-r--r--src/parser/input.rs10
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 @@
1use {SyntaxKind, TextRange, TextUnit, Token}; 1use {
2use syntax_kinds::EOF; 2 SyntaxKind, TextRange, TextUnit,
3use super::is_insignificant; 3 SyntaxKind::EOF,
4 lexer::Token,
5};
4 6
5use std::ops::{Add, AddAssign}; 7use 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 }