[][src]Trait antlr_rust::parser_rule_context::ParserRuleContext

pub trait ParserRuleContext<'input>: ParseTree<'input> + RuleContext<'input> + Debug + Tid<'input> {
    fn set_exception(&self, e: ANTLRError) { ... }
fn set_start(&self, t: Option<<Self::TF as TokenFactory<'input>>::Tok>) { ... }
fn start<'a>(&'a self) -> Ref<'a, <Self::TF as TokenFactory<'input>>::Inner>
    where
        'input: 'a
, { ... }
fn start_mut<'a>(
        &'a self
    ) -> RefMut<'a, <Self::TF as TokenFactory<'input>>::Tok>
    where
        'input: 'a
, { ... }
fn set_stop(&self, t: Option<<Self::TF as TokenFactory<'input>>::Tok>) { ... }
fn stop<'a>(&'a self) -> Ref<'a, <Self::TF as TokenFactory<'input>>::Inner>
    where
        'input: 'a
, { ... }
fn stop_mut<'a>(
        &'a self
    ) -> RefMut<'a, <Self::TF as TokenFactory<'input>>::Tok>
    where
        'input: 'a
, { ... }
fn add_child(&self, child: Rc<<Self::Ctx as ParserNodeType<'input>>::Type>) { ... }
fn remove_last_child(&self) { ... }
fn child_of_type<T>(&self, pos: usize) -> Option<Rc<T>>
    where
        T: ParserRuleContext<'input, TF = Self::TF, Ctx = Self::Ctx> + 'input,
        Self: Sized
, { ... }
fn children_of_type<T>(&self) -> Vec<Rc<T>>
    where
        T: ParserRuleContext<'input, TF = Self::TF, Ctx = Self::Ctx> + 'input,
        Self: Sized
, { ... }
fn get_token(
        &self,
        ttype: isize,
        pos: usize
    ) -> Option<Rc<TerminalNode<'input, Self::Ctx>>> { ... }
fn get_tokens(
        &self,
        ttype: isize
    ) -> Vec<Rc<TerminalNode<'input, Self::Ctx>>> { ... } }

Provided methods

fn set_exception(&self, e: ANTLRError)

fn set_start(&self, t: Option<<Self::TF as TokenFactory<'input>>::Tok>)

fn start<'a>(&'a self) -> Ref<'a, <Self::TF as TokenFactory<'input>>::Inner> where
    'input: 'a, 

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 start_mut<'a>(
    &'a self
) -> RefMut<'a, <Self::TF as TokenFactory<'input>>::Tok> where
    'input: 'a, 

fn set_stop(&self, t: Option<<Self::TF as TokenFactory<'input>>::Tok>)

fn stop<'a>(&'a self) -> Ref<'a, <Self::TF as TokenFactory<'input>>::Inner> where
    'input: 'a, 

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 stop_mut<'a>(&'a self) -> RefMut<'a, <Self::TF as TokenFactory<'input>>::Tok> where
    'input: 'a, 

fn add_child(&self, child: Rc<<Self::Ctx as ParserNodeType<'input>>::Type>)

fn remove_last_child(&self)

fn child_of_type<T>(&self, pos: usize) -> Option<Rc<T>> where
    T: ParserRuleContext<'input, TF = Self::TF, Ctx = Self::Ctx> + 'input,
    Self: Sized

fn children_of_type<T>(&self) -> Vec<Rc<T>> where
    T: ParserRuleContext<'input, TF = Self::TF, Ctx = Self::Ctx> + 'input,
    Self: Sized

fn get_token(
    &self,
    ttype: isize,
    pos: usize
) -> Option<Rc<TerminalNode<'input, Self::Ctx>>>

fn get_tokens(&self, ttype: isize) -> Vec<Rc<TerminalNode<'input, Self::Ctx>>>

Loading content...

Implementors

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

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

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

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

Loading content...