[][src]Trait antlr_rust::rule_context::RuleContext

pub trait RuleContext<'input>: CustomRuleContext<'input> {
    pub fn get_invoking_state(&self) -> isize { ... }
pub fn set_invoking_state(&self, _t: isize) { ... }
pub fn is_empty(&self) -> bool { ... }
pub fn get_parent_ctx(
        &self
    ) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>> { ... }
pub fn set_parent(
        &self,
        _parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
    ) { ... } }

Minimal rule context functionality required for parser to work properly

Provided methods

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

Internal parser state

pub fn set_invoking_state(&self, _t: isize)[src]

Sets internal parser state

pub fn is_empty(&self) -> bool[src]

A context is empty if there is no invoking state; meaning nobody called current context. Which is usually true for the root of the syntax tree

pub fn get_parent_ctx(
    &self
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
[src]

Get parent context

pub fn set_parent(
    &self,
    _parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
)
[src]

Set parent context

Loading content...

Implementors

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

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

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

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

Loading content...