pub struct NodesAggregator { /* private fields */ }
Expand description

A tool to aggregate/gather nodes in various forms and eventually emit them as a vector.

Implementations§

Gets all the aggregated nodes.

Adds a struct node.

Adds an enum node.

Adds a node for a list of syntax elements.

Adds a node for a list of syntax elements separated by a terminal.

Adds a non-keyword node for a token node (similar to an empty struct).

Adds a keyword node for a token node (similar to an empty struct).

Adds a node for a token node (similar to an empty struct).

Adds a keyword token node and a keyword terminal node of the relevant names. e.g. for pure_name=“Identifier” it creates TokenIdentifier and TerminalIdentifier.

Adds a non-keyword token node and a non-keyword terminal node of the relevant names. e.g. for pure_name=“Identifier” it creates TokenIdentifier and TerminalIdentifier.

Adds an enum node for an option with 2 variants: empty and non-empty. Creates the empty struct to be used for the empty variant. The Type for the non-empty variant is name and it should exist independently of this call.

For example, for name=TypeClause, creates an enum OptionTypeClause with variants Empty(OptionTypeClauseEmpty) and TypeClause(TypeClause), where OptionTypeClauseEmpty is created here and TypeClause should exist independently.

Trait Implementations§

Returns the “default value” for a type. 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.