diff options
author | Aleksey Kladov <[email protected]> | 2018-07-29 12:37:48 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-29 12:37:48 +0100 |
commit | ad188d4c3db34f035408afbdd6d2f3c308121f0a (patch) | |
tree | 0c6cdea50ab664a361fa4c0f6b99cb53ce00529b /src/parser/event.rs | |
parent | c12450fb4e30c3418555e47d045bb9fd4318a10a (diff) |
kill old tree
Diffstat (limited to 'src/parser/event.rs')
-rw-r--r-- | src/parser/event.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/parser/event.rs b/src/parser/event.rs index 0fbfaeb9f..83039c664 100644 --- a/src/parser/event.rs +++ b/src/parser/event.rs | |||
@@ -1,5 +1,5 @@ | |||
1 | use { | 1 | use { |
2 | ErrorMsg, File, FileBuilder, Sink, SyntaxKind, Token, GreenBuilder, | 2 | Sink, SyntaxKind, Token, |
3 | syntax_kinds::TOMBSTONE, | 3 | syntax_kinds::TOMBSTONE, |
4 | }; | 4 | }; |
5 | use super::is_insignificant; | 5 | use super::is_insignificant; |
@@ -67,12 +67,6 @@ pub(crate) enum Event { | |||
67 | }, | 67 | }, |
68 | } | 68 | } |
69 | 69 | ||
70 | pub(super) fn to_file(text: String, tokens: &[Token], events: Vec<Event>) -> File { | ||
71 | let mut builder = FileBuilder::new(text); | ||
72 | process(&mut builder, tokens, events); | ||
73 | builder.finish() | ||
74 | } | ||
75 | |||
76 | pub(super) fn process(builder: &mut Sink, tokens: &[Token], events: Vec<Event>) { | 70 | pub(super) fn process(builder: &mut Sink, tokens: &[Token], events: Vec<Event>) { |
77 | let mut idx = 0; | 71 | let mut idx = 0; |
78 | 72 | ||
@@ -147,7 +141,7 @@ pub(super) fn process(builder: &mut Sink, tokens: &[Token], events: Vec<Event>) | |||
147 | } | 141 | } |
148 | builder.leaf(kind, len); | 142 | builder.leaf(kind, len); |
149 | } | 143 | } |
150 | &Event::Error { ref msg } => builder.error(ErrorMsg { msg: msg.clone() }), | 144 | &Event::Error { ref msg } => builder.error(msg.clone()), |
151 | } | 145 | } |
152 | } | 146 | } |
153 | } | 147 | } |