Trait rslint_parser::TreeSink [−][src]
pub trait TreeSink {
fn token(&mut self, kind: SyntaxKind);
fn start_node(&mut self, kind: SyntaxKind);
fn finish_node(&mut self);
fn errors(&mut self, errors: Vec<ParserError>);
fn consume_multiple_tokens(&mut self, amount: u8, kind: SyntaxKind);
}
Expand description
An abstraction for syntax tree implementations
Required methods
fn token(&mut self, kind: SyntaxKind)
fn token(&mut self, kind: SyntaxKind)
Adds new token to the current branch.
fn start_node(&mut self, kind: SyntaxKind)
fn start_node(&mut self, kind: SyntaxKind)
Start new branch and make it current.
fn finish_node(&mut self)
fn finish_node(&mut self)
Finish current branch and restore previous branch as current.
fn errors(&mut self, errors: Vec<ParserError>)
fn errors(&mut self, errors: Vec<ParserError>)
Emit errors
fn consume_multiple_tokens(&mut self, amount: u8, kind: SyntaxKind)
fn consume_multiple_tokens(&mut self, amount: u8, kind: SyntaxKind)
Consume multiple tokens and glue them into one kind