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) { ... }
    fn get_node_text(&self, rule_names: &[&str]) -> String { ... }
}
Expand description

Implemented by generated parser for context extension for particular rule

Required Associated Types

Type that describes type of context nodes, stored in this context

Required Methods

Rule index that corresponds to this context type

Provided Methods

Returns text representation of current node type, rule name for context nodes and token text for terminal nodes

Implementors