[][src]Trait antlr_rust::rule_context::CustomRuleContext

pub trait CustomRuleContext<'input> {
    type TF: TokenFactory<'input> + 'input;
    type Ctx: ParserNodeType<'input, TF = Self::TF>;
    pub fn get_rule_index(&self) -> usize;

    pub fn get_alt_number(&self) -> isize { ... }
pub fn set_alt_number(&self, _alt_number: isize) { ... } }

Implemented by generated parser for context extension for particular rule

Associated Types

type TF: TokenFactory<'input> + 'input[src]

type Ctx: ParserNodeType<'input, TF = Self::TF>[src]

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

Loading content...

Required methods

pub fn get_rule_index(&self) -> usize[src]

Rule index that corresponds to this context type

Loading content...

Provided methods

pub fn get_alt_number(&self) -> isize[src]

pub fn set_alt_number(&self, _alt_number: isize)[src]

Loading content...

Implementors

impl<'input, Ctx: CustomRuleContext<'input>> CustomRuleContext<'input> for BaseParserRuleContext<'input, Ctx>[src]

type TF = Ctx::TF

type Ctx = Ctx::Ctx

impl<'input, ExtCtx: CustomRuleContext<'input>> CustomRuleContext<'input> for BaseRuleContext<'input, ExtCtx>[src]

type TF = ExtCtx::TF

type Ctx = ExtCtx::Ctx

impl<'input, Node: ParserNodeType<'input>, T: 'static> CustomRuleContext<'input> for LeafNode<'input, Node, T>[src]

type TF = Node::TF

type Ctx = Node

impl<'input, T, I: ?Sized> CustomRuleContext<'input> for T where
    T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
    I: ParserRuleContext<'input> + 'input, 
[src]

type TF = I::TF

type Ctx = I::Ctx

Loading content...