aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/event.rs6
-rw-r--r--crates/ra_parser/src/lib.rs8
2 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_parser/src/event.rs b/crates/ra_parser/src/event.rs
index c1773e8e0..87cf4eca0 100644
--- a/crates/ra_parser/src/event.rs
+++ b/crates/ra_parser/src/event.rs
@@ -116,12 +116,12 @@ pub(super) fn process(sink: &mut dyn TreeSink, mut events: Vec<Event>) {
116 } 116 }
117 117
118 for kind in forward_parents.drain(..).rev() { 118 for kind in forward_parents.drain(..).rev() {
119 sink.start_branch(kind); 119 sink.start_node(kind);
120 } 120 }
121 } 121 }
122 Event::Finish => sink.finish_branch(), 122 Event::Finish => sink.finish_node(),
123 Event::Token { kind, n_raw_tokens } => { 123 Event::Token { kind, n_raw_tokens } => {
124 sink.leaf(kind, n_raw_tokens); 124 sink.token(kind, n_raw_tokens);
125 } 125 }
126 Event::Error { msg } => sink.error(msg), 126 Event::Error { msg } => sink.error(msg),
127 } 127 }
diff --git a/crates/ra_parser/src/lib.rs b/crates/ra_parser/src/lib.rs
index ddc08e462..30ba06aac 100644
--- a/crates/ra_parser/src/lib.rs
+++ b/crates/ra_parser/src/lib.rs
@@ -40,15 +40,15 @@ pub trait TokenSource {
40 40
41/// `TreeSink` abstracts details of a particular syntax tree implementation. 41/// `TreeSink` abstracts details of a particular syntax tree implementation.
42pub trait TreeSink { 42pub trait TreeSink {
43 /// Adds new leaf to the current branch. 43 /// Adds new token to the current branch.
44 fn leaf(&mut self, kind: SyntaxKind, n_tokens: u8); 44 fn token(&mut self, kind: SyntaxKind, n_tokens: u8);
45 45
46 /// Start new branch and make it current. 46 /// Start new branch and make it current.
47 fn start_branch(&mut self, kind: SyntaxKind); 47 fn start_node(&mut self, kind: SyntaxKind);
48 48
49 /// Finish current branch and restore previous 49 /// Finish current branch and restore previous
50 /// branch as current. 50 /// branch as current.
51 fn finish_branch(&mut self); 51 fn finish_node(&mut self);
52 52
53 fn error(&mut self, error: ParseError); 53 fn error(&mut self, error: ParseError);
54} 54}