Trait ra_ap_parser::TreeSink [−][src]
pub trait TreeSink {
fn token(&mut self, kind: SyntaxKind, n_tokens: u8);
fn start_node(&mut self, kind: SyntaxKind);
fn finish_node(&mut self);
fn error(&mut self, error: ParseError);
}
Expand description
TreeSink
abstracts details of a particular syntax tree implementation.
Required methods
fn token(&mut self, kind: SyntaxKind, n_tokens: u8)
fn token(&mut self, kind: SyntaxKind, n_tokens: u8)
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.