[−][src]Struct antlr_rust::rule_context::BaseRuleContext
Trait Implementations
impl<'input, ExtCtx: CustomRuleContext<'input>> CustomRuleContext<'input> for BaseRuleContext<'input, ExtCtx>
[src]
type TF = ExtCtx::TF
type Ctx = ExtCtx::Ctx
fn get_rule_index(&self) -> usize
[src]
fn get_alt_number(&self) -> isize
[src]
fn set_alt_number(&self, _alt_number: isize)
[src]
impl<'input, ExtCtx: CustomRuleContext<'input>> Debug for BaseRuleContext<'input, ExtCtx>
[src]
impl<'input, ExtCtx: CustomRuleContext<'input>> ParseTree<'input> for BaseRuleContext<'input, ExtCtx>
[src]
fn get_source_interval(&self) -> Interval
[src]
fn get_text(&self) -> String
[src]
fn to_string_tree(
&self,
r: &dyn Recognizer<'input, TF = Self::TF, Node = Self::Ctx>
) -> String
[src]
&self,
r: &dyn Recognizer<'input, TF = Self::TF, Node = Self::Ctx>
) -> String
impl<'input, ExtCtx: CustomRuleContext<'input> + TidAble<'input>> ParserRuleContext<'input> for BaseRuleContext<'input, ExtCtx>
[src]
fn set_exception(&self, e: ANTLRError)
[src]
fn set_start(&self, t: Option<<Self::TF as TokenFactory<'input>>::Tok>)
[src]
fn start<'a>(&'a self) -> Ref<'a, <Self::TF as TokenFactory<'input>>::Inner> where
'input: 'a,
[src]
'input: 'a,
fn start_mut<'a>(
&'a self
) -> RefMut<'a, <Self::TF as TokenFactory<'input>>::Tok> where
'input: 'a,
[src]
&'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>)
[src]
fn stop<'a>(&'a self) -> Ref<'a, <Self::TF as TokenFactory<'input>>::Inner> where
'input: 'a,
[src]
'input: 'a,
fn stop_mut<'a>(&'a self) -> RefMut<'a, <Self::TF as TokenFactory<'input>>::Tok> where
'input: 'a,
[src]
'input: 'a,
fn add_child(&self, child: Rc<<Self::Ctx as ParserNodeType<'input>>::Type>)
[src]
fn remove_last_child(&self)
[src]
fn child_of_type<T>(&self, pos: usize) -> Option<Rc<T>> where
T: ParserRuleContext<'input, TF = Self::TF, Ctx = Self::Ctx> + 'input,
Self: Sized,
[src]
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,
[src]
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>>>
[src]
&self,
ttype: isize,
pos: usize
) -> Option<Rc<TerminalNode<'input, Self::Ctx>>>
fn get_tokens(&self, ttype: isize) -> Vec<Rc<TerminalNode<'input, Self::Ctx>>>
[src]
impl<'input, ExtCtx: CustomRuleContext<'input>> RuleContext<'input> for BaseRuleContext<'input, ExtCtx>
[src]
fn get_invoking_state(&self) -> isize
[src]
fn set_invoking_state(&self, t: isize)
[src]
fn get_parent_ctx(
&self
) -> Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
[src]
&self
) -> Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
fn set_parent(
&self,
parent: &Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
)
[src]
&self,
parent: &Option<Rc<<ExtCtx::Ctx as ParserNodeType<'input>>::Type>>
)
fn is_empty(&self) -> bool
[src]
impl<'input, ExtCtx: CustomRuleContext<'input>> TidAble<'input> for BaseRuleContext<'input, ExtCtx> where
ExtCtx: TidAble<'input>,
[src]
ExtCtx: TidAble<'input>,
impl<'input, ExtCtx: CustomRuleContext<'input>> Tree<'input> for BaseRuleContext<'input, ExtCtx>
[src]
fn get_parent(&self) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
[src]
fn has_parent(&self) -> bool
[src]
fn get_payload(&self) -> Box<dyn Any>
[src]
fn get_child(
&self,
i: usize
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
[src]
&self,
i: usize
) -> Option<Rc<<Self::Ctx as ParserNodeType<'input>>::Type>>
fn get_child_count(&self) -> usize
[src]
fn get_children<'a>(
&'a self
) -> Box<dyn Iterator<Item = Rc<<Self::Ctx as ParserNodeType<'input>>::Type>> + 'a> where
'input: 'a,
[src]
&'a self
) -> Box<dyn Iterator<Item = Rc<<Self::Ctx as ParserNodeType<'input>>::Type>> + 'a> where
'input: 'a,
Auto Trait Implementations
impl<'input, ExtCtx> !RefUnwindSafe for BaseRuleContext<'input, ExtCtx>
impl<'input, ExtCtx> !Send for BaseRuleContext<'input, ExtCtx>
impl<'input, ExtCtx> !Sync for BaseRuleContext<'input, ExtCtx>
impl<'input, ExtCtx> Unpin for BaseRuleContext<'input, ExtCtx> where
ExtCtx: Unpin,
ExtCtx: Unpin,
impl<'input, ExtCtx> !UnwindSafe for BaseRuleContext<'input, ExtCtx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<'input, T, I> CustomRuleContext<'input> for T where
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
[src]
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
type TF = <I as CustomRuleContext<'input>>::TF
type Ctx = <I as CustomRuleContext<'input>>::Ctx
pub fn get_rule_index(&Self) -> usize
[src]
pub fn get_alt_number(&Self) -> isize
[src]
pub fn set_alt_number(&Self, isize)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> NodeText for T
[src]
impl<'input, T> NodeText for T where
T: CustomRuleContext<'input>,
[src]
T: CustomRuleContext<'input>,
impl<'input, T, I> ParseTree<'input> for T where
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
[src]
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
pub fn get_source_interval(&Self) -> Interval
[src]
pub fn get_text(&Self) -> String
[src]
fn to_string_tree(
&self,
r: &dyn Recognizer<'input, TF = Self::TF, Node = Self::Ctx>
) -> String
[src]
&self,
r: &dyn Recognizer<'input, TF = Self::TF, Node = Self::Ctx>
) -> String
impl<'input, T, I> ParserRuleContext<'input> for T where
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
[src]
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
pub fn set_exception(&Self, ANTLRError)
[src]
pub fn set_start(
&Self,
Option<<<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok>
)
[src]
&Self,
Option<<<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok>
)
pub fn start<'a>(
&'a Self
) -> Ref<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Inner> where
'input: 'a,
[src]
&'a Self
) -> Ref<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Inner> where
'input: 'a,
pub fn start_mut<'a>(
&'a Self
) -> RefMut<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok> where
'input: 'a,
[src]
&'a Self
) -> RefMut<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok> where
'input: 'a,
pub fn set_stop(
&Self,
Option<<<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok>
)
[src]
&Self,
Option<<<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok>
)
pub fn stop<'a>(
&'a Self
) -> Ref<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Inner> where
'input: 'a,
[src]
&'a Self
) -> Ref<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Inner> where
'input: 'a,
pub fn stop_mut<'a>(
&'a Self
) -> RefMut<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok> where
'input: 'a,
[src]
&'a Self
) -> RefMut<'a, <<T as CustomRuleContext<'input>>::TF as TokenFactory<'input>>::Tok> where
'input: 'a,
pub fn add_child(
&Self,
Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>
)
[src]
&Self,
Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>
)
pub fn remove_last_child(&Self)
[src]
fn child_of_type<T>(&self, pos: usize) -> Option<Rc<T>> where
T: ParserRuleContext<'input, TF = Self::TF, Ctx = Self::Ctx> + 'input,
Self: Sized,
[src]
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,
[src]
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>>>
[src]
&self,
ttype: isize,
pos: usize
) -> Option<Rc<TerminalNode<'input, Self::Ctx>>>
fn get_tokens(&self, ttype: isize) -> Vec<Rc<TerminalNode<'input, Self::Ctx>>>
[src]
impl<'input, T, I> RuleContext<'input> for T where
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
[src]
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
pub fn get_invoking_state(&Self) -> isize
[src]
pub fn set_invoking_state(&Self, isize)
[src]
pub fn is_empty(&Self) -> bool
[src]
pub fn get_parent_ctx(
&Self
) -> Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
[src]
&Self
) -> Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
pub fn set_parent(
&Self,
&Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
)
[src]
&Self,
&Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
)
impl<'input, T> RuleContextExt<'input> for T where
T: 'input + ParserRuleContext<'input> + ?Sized,
[src]
T: 'input + ParserRuleContext<'input> + ?Sized,
pub fn to_string<Z>(&Rc<T>, Option<&[&str]>, Option<Rc<Z>>) -> String where
Z: ParserRuleContext<'input, Ctx = <T as CustomRuleContext<'input>>::Ctx, TF = <T as CustomRuleContext<'input>>::TF> + 'input + ?Sized,
<T as CustomRuleContext<'input>>::Ctx: ParserNodeType<'input>,
Rc<T>: CoerceUnsized<Rc<Z>>,
<<T as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type == Z,
[src]
Z: ParserRuleContext<'input, Ctx = <T as CustomRuleContext<'input>>::Ctx, TF = <T as CustomRuleContext<'input>>::TF> + 'input + ?Sized,
<T as CustomRuleContext<'input>>::Ctx: ParserNodeType<'input>,
Rc<T>: CoerceUnsized<Rc<Z>>,
<<T as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type == Z,
pub fn accept_children<V>(&Self, &mut V) where
V: ParseTreeVisitor<'input, <T as CustomRuleContext<'input>>::Ctx> + ?Sized,
<<T as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type: VisitableDyn<V>,
[src]
V: ParseTreeVisitor<'input, <T as CustomRuleContext<'input>>::Ctx> + ?Sized,
<<T as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type: VisitableDyn<V>,
impl<'a, T> Tid<'a> for T where
T: TidAble<'a> + ?Sized,
[src]
T: TidAble<'a> + ?Sized,
impl<'a, X> TidExt<'a> for X where
X: Tid<'a> + ?Sized,
[src]
X: Tid<'a> + ?Sized,
pub fn is<T>(&self) -> bool where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_ref<T>(&'b self) -> Option<&'b T> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_mut<T>(&'b mut self) -> Option<&'b mut T> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_rc<T>(self: Rc<X>) -> Result<Rc<T>, Rc<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_arc<T>(self: Arc<X>) -> Result<Arc<T>, Arc<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
pub fn downcast_box<T>(self: Box<X>) -> Result<Box<T>, Box<X>> where
T: Tid<'a>,
[src]
T: Tid<'a>,
impl<'input, T, I> Tree<'input> for T where
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
[src]
I: ParserRuleContext<'input> + 'input + ?Sized,
T: DerefSeal<Target = I> + 'input + Debug + Tid<'input>,
pub fn get_parent(
&Self
) -> Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
[src]
&Self
) -> Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
pub fn has_parent(&Self) -> bool
[src]
pub fn get_payload(&Self) -> Box<dyn Any + 'static>
[src]
pub fn get_child(
&Self,
usize
) -> Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
[src]
&Self,
usize
) -> Option<Rc<<<I as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>>
pub fn get_child_count(&Self) -> usize
[src]
pub fn get_children<'a>(
&'a Self
) -> Box<dyn Iterator<Item = Rc<<<T as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>> + 'a> where
'input: 'a,
[src]
&'a Self
) -> Box<dyn Iterator<Item = Rc<<<T as CustomRuleContext<'input>>::Ctx as ParserNodeType<'input>>::Type>> + 'a> where
'input: 'a,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,