[−][src]Trait antlr_rust::parser_rule_context::ParserRuleContext
Required methods
fn set_exception(&self, e: ANTLRError)
fn set_start(&self, t: Option<OwningToken>)
fn get_start(&self) -> Ref<OwningToken>
Get the initial token in this context. Note that the range from start to stop is inclusive, so for rules that do not consume anything (for example, zero length or error productions) this token may exceed stop.
fn set_stop(&self, t: Option<OwningToken>)
fn get_stop(&self) -> Ref<OwningToken>
Get the final token in this context. Note that the range from start to stop is inclusive, so for rules that do not consume anything (for example, zero length or error productions) this token may precede start.
fn add_token_node(&self, token: TerminalNode) -> Rc<dyn ParserRuleContext>
fn add_error_node(&self, bad_token: ErrorNode) -> Rc<dyn ParserRuleContext>
fn add_child(&self, child: ParserRuleContextType)
fn remove_last_child(&self)
fn enter_rule(&self, listener: &mut dyn Any)
fn exit_rule(&self, listener: &mut dyn Any)
fn upcast_any(&self) -> &dyn Any
fn upcast(&self) -> &dyn ParserRuleContext
Provided methods
fn child_of_type<T: ParserRuleContext>(&self, pos: usize) -> Option<Rc<T>> where
Self: Sized,
Self: Sized,
fn children_of_type<T: ParserRuleContext>(&self) -> Vec<Rc<T>> where
Self: Sized,
Self: Sized,
fn get_token(&self, ttype: isize, pos: usize) -> Option<Rc<TerminalNode>>
fn get_tokens(&self, ttype: isize) -> Vec<Rc<TerminalNode>>
Implementors
impl<Ctx: CustomRuleContext> ParserRuleContext for BaseParserRuleContext<Ctx>
[src]
fn set_exception(&self, _e: ANTLRError)
[src]
fn set_start(&self, t: Option<OwningToken>)
[src]
fn get_start(&self) -> Ref<OwningToken>
[src]
fn set_stop(&self, t: Option<OwningToken>)
[src]
fn get_stop(&self) -> Ref<OwningToken>
[src]
fn add_token_node(&self, token: TerminalNode) -> Rc<dyn ParserRuleContext>
[src]
fn add_error_node(&self, bad_token: ErrorNode) -> Rc<dyn ParserRuleContext>
[src]
fn add_child(&self, child: ParserRuleContextType)
[src]
fn remove_last_child(&self)
[src]
fn enter_rule(&self, listener: &mut dyn Any)
[src]
fn exit_rule(&self, listener: &mut dyn Any)
[src]
fn upcast_any(&self) -> &dyn Any
[src]
fn upcast(&self) -> &dyn ParserRuleContext
[src]
impl<T: DerefSeal<Target = I> + Debug + 'static, I: ParserRuleContext + ?Sized> ParserRuleContext for T
[src]
fn set_exception(&self, e: ANTLRError)
[src]
fn set_start(&self, t: Option<OwningToken>)
[src]
fn get_start(&self) -> Ref<OwningToken>
[src]
fn set_stop(&self, t: Option<OwningToken>)
[src]
fn get_stop(&self) -> Ref<OwningToken>
[src]
fn add_token_node(
&self,
token: BaseParserRuleContext<TerminalNodeCtx>
) -> Rc<dyn ParserRuleContext>
[src]
&self,
token: BaseParserRuleContext<TerminalNodeCtx>
) -> Rc<dyn ParserRuleContext>
fn add_error_node(
&self,
bad_token: BaseParserRuleContext<ErrorNodeCtx>
) -> Rc<dyn ParserRuleContext>
[src]
&self,
bad_token: BaseParserRuleContext<ErrorNodeCtx>
) -> Rc<dyn ParserRuleContext>