Struct rustlr::zc_parser::StackedItem
source · [−]pub struct StackedItem<AT: Default> {
pub value: AT,
pub line: usize,
pub column: usize,
/* private fields */
}
Expand description
these structures are what’s on the parse stack. When writing a
grammar rule such as E --> E:a + E:b
, the variables a and b will
be bound to values of this type, and thus inside the semantic actions
one would need to use a.value
to extract the value, which is of the
declared ‘absyntype’ of the grammar. Alternatively, one can use a
pattern: E:@a@ + E:@b@
to bind a and b directly to the values.
Fields
value: AT
line: usize
column: usize
Implementations
Auto Trait Implementations
impl<AT> RefUnwindSafe for StackedItem<AT> where
AT: RefUnwindSafe,
impl<AT> Send for StackedItem<AT> where
AT: Send,
impl<AT> Sync for StackedItem<AT> where
AT: Sync,
impl<AT> Unpin for StackedItem<AT> where
AT: Unpin,
impl<AT> UnwindSafe for StackedItem<AT> where
AT: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more