pub struct ParserReturnAction {
pub source_state: usize,
pub rule_index: usize,
pub name: &'static str,
pub value: i64,
}Expand description
Integer return-value assignment attached to an ATN action transition.
Generated parsers use this metadata when target actions assign a simple
return field such as $y=1000;. The interpreter applies it while selecting
the recognized path so the finished parse tree can answer later
$label.y action templates.
Fields§
§source_state: usizeATN state containing the action transition.
rule_index: usizeRule index recorded by the serialized action transition.
name: &'static strReturn-field name as it appears in the grammar.
value: i64Literal integer value assigned by the action.
Trait Implementations§
Source§impl Clone for ParserReturnAction
impl Clone for ParserReturnAction
Source§fn clone(&self) -> ParserReturnAction
fn clone(&self) -> ParserReturnAction
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 ParserReturnAction
impl Debug for ParserReturnAction
Source§impl Ord for ParserReturnAction
impl Ord for ParserReturnAction
Source§fn cmp(&self, other: &ParserReturnAction) -> Ordering
fn cmp(&self, other: &ParserReturnAction) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ParserReturnAction
impl PartialEq for ParserReturnAction
Source§fn eq(&self, other: &ParserReturnAction) -> bool
fn eq(&self, other: &ParserReturnAction) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ParserReturnAction
impl PartialOrd for ParserReturnAction
impl Copy for ParserReturnAction
impl Eq for ParserReturnAction
impl StructuralPartialEq for ParserReturnAction
Auto Trait Implementations§
impl Freeze for ParserReturnAction
impl RefUnwindSafe for ParserReturnAction
impl Send for ParserReturnAction
impl Sync for ParserReturnAction
impl Unpin for ParserReturnAction
impl UnsafeUnpin for ParserReturnAction
impl UnwindSafe for ParserReturnAction
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