Trait antlr_rust::rule_context::RuleContext [−][src]
pub trait RuleContext<'input>: CustomRuleContext<'input> {
fn get_invoking_state(&self) -> isize { ... }
fn set_invoking_state(&self, _t: isize) { ... }
fn is_empty(&self) -> bool { ... }
fn get_parent_ctx(
&self
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>> { ... }
fn set_parent(
&self,
_parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
) { ... }
}
Expand description
Minimal rule context functionality required for parser to work properly
Provided methods
fn get_invoking_state(&self) -> isize
fn get_invoking_state(&self) -> isize
Internal parser state
fn set_invoking_state(&self, _t: isize)
fn set_invoking_state(&self, _t: isize)
Sets internal parser state
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
fn get_parent_ctx(
&self
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
fn get_parent_ctx(
&self
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
Get parent context
fn set_parent(
&self,
_parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
)
fn set_parent(
&self,
_parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
)
Set parent context