[][src]Trait ra_ap_parser::TreeSink

pub trait TreeSink {
    pub fn token(&mut self, kind: SyntaxKind, n_tokens: u8);
pub fn start_node(&mut self, kind: SyntaxKind);
pub fn finish_node(&mut self);
pub fn error(&mut self, error: ParseError); }

TreeSink abstracts details of a particular syntax tree implementation.

Required methods

pub fn token(&mut self, kind: SyntaxKind, n_tokens: u8)[src]

Adds new token to the current branch.

pub fn start_node(&mut self, kind: SyntaxKind)[src]

Start new branch and make it current.

pub fn finish_node(&mut self)[src]

Finish current branch and restore previous branch as current.

pub fn error(&mut self, error: ParseError)[src]

Loading content...

Implementors

Loading content...