diff options
author | Aleksey Kladov <[email protected]> | 2018-07-30 12:08:06 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-30 12:08:06 +0100 |
commit | 1edb58a802f183f79dc2c4bc15921394ef8abb31 (patch) | |
tree | 24114171c61a9f433b9a54008057fa0297f91302 /src/yellow/builder.rs | |
parent | 6983091d6d255bcfd17c4f8c14015d8abc77928d (diff) |
reformat
Diffstat (limited to 'src/yellow/builder.rs')
-rw-r--r-- | src/yellow/builder.rs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/yellow/builder.rs b/src/yellow/builder.rs index 65cc97ff9..0f7ca45d7 100644 --- a/src/yellow/builder.rs +++ b/src/yellow/builder.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use { | 1 | use { |
2 | parser::Sink, | ||
3 | yellow::{GreenNode, GreenNodeBuilder, SyntaxError, SyntaxNode, SyntaxRoot}, | ||
2 | SyntaxKind, TextRange, TextUnit, | 4 | SyntaxKind, TextRange, TextUnit, |
3 | yellow::{SyntaxNode, SyntaxRoot, GreenNode, GreenNodeBuilder, SyntaxError}, | ||
4 | parser::Sink | ||
5 | }; | 5 | }; |
6 | 6 | ||
7 | pub(crate) struct GreenBuilder { | 7 | pub(crate) struct GreenBuilder { |
@@ -12,9 +12,7 @@ pub(crate) struct GreenBuilder { | |||
12 | errors: Vec<SyntaxError>, | 12 | errors: Vec<SyntaxError>, |
13 | } | 13 | } |
14 | 14 | ||
15 | impl GreenBuilder { | 15 | impl GreenBuilder {} |
16 | |||
17 | } | ||
18 | 16 | ||
19 | impl Sink for GreenBuilder { | 17 | impl Sink for GreenBuilder { |
20 | type Tree = SyntaxNode; | 18 | type Tree = SyntaxNode; |
@@ -53,7 +51,10 @@ impl Sink for GreenBuilder { | |||
53 | } | 51 | } |
54 | 52 | ||
55 | fn error(&mut self, message: String) { | 53 | fn error(&mut self, message: String) { |
56 | self.errors.push(SyntaxError { message, offset: self.pos }) | 54 | self.errors.push(SyntaxError { |
55 | message, | ||
56 | offset: self.pos, | ||
57 | }) | ||
57 | } | 58 | } |
58 | 59 | ||
59 | fn finish(self) -> SyntaxNode { | 60 | fn finish(self) -> SyntaxNode { |
@@ -61,5 +62,3 @@ impl Sink for GreenBuilder { | |||
61 | SyntaxNode::new_owned(root) | 62 | SyntaxNode::new_owned(root) |
62 | } | 63 | } |
63 | } | 64 | } |
64 | |||
65 | |||