aboutsummaryrefslogtreecommitdiff
path: root/src/parser/mod.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-01-20 20:25:34 +0000
committerAleksey Kladov <[email protected]>2018-01-20 20:25:34 +0000
commit0b5d39f2a204e5ec6cd6205440e4cdc763162814 (patch)
tree8d201ef62b5e4fe48e3cce7b557071e434530801 /src/parser/mod.rs
parentbe60d5aa6669a74e92495288f44b7f9258a8518f (diff)
Markers API
Diffstat (limited to 'src/parser/mod.rs')
-rw-r--r--src/parser/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parser/mod.rs b/src/parser/mod.rs
index 0c29442f9..5ec4b8e93 100644
--- a/src/parser/mod.rs
+++ b/src/parser/mod.rs
@@ -1,6 +1,7 @@
1use {Token, File, FileBuilder, Sink, SyntaxKind}; 1use {Token, File, FileBuilder, Sink, SyntaxKind};
2 2
3use syntax_kinds::*; 3use syntax_kinds::*;
4use tree::TOMBSTONE;
4 5
5mod event_parser; 6mod event_parser;
6use self::event_parser::Event; 7use self::event_parser::Event;
@@ -29,6 +30,8 @@ fn from_events_to_file(
29 } 30 }
30 31
31 match event { 32 match event {
33 &Event::Start { kind: TOMBSTONE, .. } => (),
34
32 &Event::Start { .. } => { 35 &Event::Start { .. } => {
33 forward_parents.clear(); 36 forward_parents.clear();
34 let mut idx = i; 37 let mut idx = i;
@@ -62,7 +65,7 @@ fn from_events_to_file(
62 } 65 }
63 builder.finish_internal() 66 builder.finish_internal()
64 }, 67 },
65 &Event::Token { kind, mut n_raw_tokens } => loop { 68 &Event::Token { kind: _, mut n_raw_tokens } => loop {
66 let token = tokens[idx]; 69 let token = tokens[idx];
67 if !is_insignificant(token.kind) { 70 if !is_insignificant(token.kind) {
68 n_raw_tokens -= 1; 71 n_raw_tokens -= 1;