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: ATline: usizecolumn: usize

Implementations

converts the information in a stacked item to an LBox enclosing the abstract syntax value along with starting line and column numbers

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.