[−][src]Trait antlr_rust::rule_context::RuleContext
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]
&self
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
Get parent context
pub fn set_parent(
&self,
_parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
)
[src]
&self,
_parent: &Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
)
Set parent context
Implementors
impl<'input, Ctx: CustomRuleContext<'input>> RuleContext<'input> for BaseParserRuleContext<'input, Ctx>
[src]
pub fn get_invoking_state(&self) -> isize
[src]
pub fn set_invoking_state(&self, t: isize)
[src]
pub fn get_parent_ctx(
&self
) -> Option<Rc<<Ctx::Ctx as ParserNodeType<'input>>::Type>>
[src]
&self
) -> Option<Rc<<Ctx::Ctx as ParserNodeType<'input>>::Type>>
pub fn set_parent(
&self,
parent: &Option<Rc<<Ctx::Ctx as ParserNodeType<'input>>::Type>>
)
[src]
&self,
parent: &Option<Rc<<Ctx::Ctx as ParserNodeType<'input>>::Type>>
)
impl<'input, ExtCtx: CustomRuleContext<'input>> RuleContext<'input> for BaseRuleContext<'input, ExtCtx>
[src]
pub fn get_invoking_state(&self) -> isize
[src]
pub fn set_invoking_state(&self, t: isize)
[src]
pub fn get_parent_ctx(
&self
) -> Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
[src]
&self
) -> Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
pub fn set_parent(
&self,
parent: &Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
)
[src]
&self,
parent: &Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
)
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]
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
I: ParserRuleContext<'input> + 'input,
pub fn get_invoking_state(&self) -> isize
[src]
pub fn set_invoking_state(&self, t: isize)
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn get_parent_ctx(
&self
) -> Option<Rc<<I::Ctx as ParserNodeType<'input>>::Type>>
[src]
&self
) -> Option<Rc<<I::Ctx as ParserNodeType<'input>>::Type>>
pub fn set_parent(
&self,
parent: &Option<Rc<<I::Ctx as ParserNodeType<'input>>::Type>>
)
[src]
&self,
parent: &Option<Rc<<I::Ctx as ParserNodeType<'input>>::Type>>
)