Trait antlr_rust::rule_context::CustomRuleContext [−][src]
pub trait CustomRuleContext<'input> {
type TF: TokenFactory<'input> + 'input;
type Ctx: ParserNodeType<'input, TF = Self::TF>;
fn get_rule_index(&self) -> usize;
fn get_alt_number(&self) -> isize { ... }
fn set_alt_number(&self, _alt_number: isize) { ... }
}
Expand description
Implemented by generated parser for context extension for particular rule
Associated Types
type TF: TokenFactory<'input> + 'input
type Ctx: ParserNodeType<'input, TF = Self::TF>
type Ctx: ParserNodeType<'input, TF = Self::TF>
Type that describes type of context nodes, stored in this context
Required methods
fn get_rule_index(&self) -> usize
fn get_rule_index(&self) -> usize
Rule index that corresponds to this context type