pub struct ParserRuleContext { /* private fields */ }Implementations§
Source§impl ParserRuleContext
impl ParserRuleContext
pub const fn new(rule_index: usize, invoking_state: isize) -> Self
pub const fn rule_index(&self) -> usize
pub const fn invoking_state(&self) -> isize
pub const fn alt_number(&self) -> usize
pub const fn set_alt_number(&mut self, alt_number: usize)
pub const fn start(&self) -> Option<&CommonToken>
pub const fn stop(&self) -> Option<&CommonToken>
pub fn set_start(&mut self, token: CommonToken)
pub fn set_stop(&mut self, token: CommonToken)
Sourcepub fn set_int_return(&mut self, name: impl Into<String>, value: i64)
pub fn set_int_return(&mut self, name: impl Into<String>, value: i64)
Stores a generated integer return value on this rule context.
Sourcepub fn int_return(&self, name: &str) -> Option<i64>
pub fn int_return(&self, name: &str) -> Option<i64>
Reads a generated integer return value from this rule context.
pub const fn exception(&self) -> Option<&AntlrError>
pub fn set_exception(&mut self, error: AntlrError)
pub fn children(&self) -> &[ParseTree]
pub fn add_child(&mut self, child: ParseTree)
pub fn text(&self) -> String
pub fn to_string_tree(&self, rule_names: &[String]) -> String
Trait Implementations§
Source§impl Clone for ParserRuleContext
impl Clone for ParserRuleContext
Source§fn clone(&self) -> ParserRuleContext
fn clone(&self) -> ParserRuleContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParserRuleContext
impl Debug for ParserRuleContext
Source§impl PartialEq for ParserRuleContext
impl PartialEq for ParserRuleContext
Source§fn eq(&self, other: &ParserRuleContext) -> bool
fn eq(&self, other: &ParserRuleContext) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ParserRuleContext
impl StructuralPartialEq for ParserRuleContext
Auto Trait Implementations§
impl Freeze for ParserRuleContext
impl RefUnwindSafe for ParserRuleContext
impl Send for ParserRuleContext
impl Sync for ParserRuleContext
impl Unpin for ParserRuleContext
impl UnsafeUnpin for ParserRuleContext
impl UnwindSafe for ParserRuleContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more