diff options
author | Veetaha <[email protected]> | 2020-01-28 05:09:13 +0000 |
---|---|---|
committer | Veetaha <[email protected]> | 2020-02-03 22:00:55 +0000 |
commit | 9e7eaa959f9dc368a55f1a80b35651b78b3d0883 (patch) | |
tree | 4b1f4af14d9898301949fa937219006d671a72ef /crates/ra_syntax/src/parsing/text_tree_sink.rs | |
parent | bf60661aa3e2a77fedb3e1627675842d05538860 (diff) |
ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR review
Diffstat (limited to 'crates/ra_syntax/src/parsing/text_tree_sink.rs')
-rw-r--r-- | crates/ra_syntax/src/parsing/text_tree_sink.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs index 5faac588b..dd202601d 100644 --- a/crates/ra_syntax/src/parsing/text_tree_sink.rs +++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs | |||
@@ -92,14 +92,14 @@ impl<'a> TreeSink for TextTreeSink<'a> { | |||
92 | } | 92 | } |
93 | 93 | ||
94 | impl<'a> TextTreeSink<'a> { | 94 | impl<'a> TextTreeSink<'a> { |
95 | pub(super) fn new(text: &'a str, tokens: &'a [Token], errors: Vec<SyntaxError>) -> Self { | 95 | pub(super) fn new(text: &'a str, tokens: &'a [Token]) -> Self { |
96 | Self { | 96 | Self { |
97 | text, | 97 | text, |
98 | tokens, | 98 | tokens, |
99 | text_pos: 0.into(), | 99 | text_pos: 0.into(), |
100 | token_pos: 0, | 100 | token_pos: 0, |
101 | state: State::PendingStart, | 101 | state: State::PendingStart, |
102 | inner: SyntaxTreeBuilder::new(errors), | 102 | inner: SyntaxTreeBuilder::default(), |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||