pub enum ParseTreeStackEntry<'t> {
    Nd(Node<ParseTreeType<'t>>),
    Id(NodeId),
}
Expand description

The type of elements in the parser’s parse tree stack.

  • ‘Nd’ references nodes not yet inserted into the parse tree.
  • ‘Id’ holds node ids to nodes that are already part of the parse tree.

Variants§

§

Nd(Node<ParseTreeType<'t>>)

The node is not inserted into the parse tree yet. Thus we can access it directly.

§

Id(NodeId)

The node is already inserted into the parse tree. Wee need to lookup the node in the parse tree via the NodeId.

Implementations§

Abstracts from the actual place where the node exists and returns the inner ParseTreeType.

'a refers to the lifetime of self. 'b refers to the lifetime of the parse tree.

Tries to access the Token of the ParseTreeStackEntry. Can fail if the entry is no terminal (i.e. a non-terminal).

'a refers to the lifetime of self. 'b refers to the lifetime of the parse tree.

't refers to the lifetime of the scanned text.

Tries to access the text of the ParseTreeStackEntry. Can fail if the entry is no terminal (i.e. a non-terminal).

'a refers to the lifetime of self. 'b refers to the lifetime of the parse tree.

Trait Implementations§

Formats the value using the given formatter. Read more

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.