Expand description
Data information to build the AST And some functions to work with AST
Modules§
- flat
- Data information to build the Flat AST And some functions to work with it
Structs§
- Error
- Context information about an error manipulanting the ast You will have an String with the description, and the node wich produced the error It will have the error description and the string of node info
Enums§
- Node
- Information of a node
Functions§
- check_
empty_ nodes - Consume a node if it’s a Rule kind with a specific value and return the rest of nodes and the sub_nodes for the consumed node
- consume_
node_ get_ subnodes_ for_ rule_ name_ is - Consume a node if it’s a Rule kind with a specific value and return the rest of nodes and the sub_nodes for the consumed node
- consume_
this_ value - Consume a node if it’s a Val kind and the vaule is equal to the provider one
- consume_
val - Given a slice of nodes, return the value (&str) of first node if it is a Node::Rule and return the rest of nodes
- error
- Helper to create an ast::Error
- get_
node_ val - Get the value of the Node If node is not a Node::Val, it will return an error
- get_
nodename_ and_ nodes - It will get the node name and a slice to the nodes contained by the node
- get_
nodes_ unique_ val - Sometimes, processing the ast, you will exptect to have an unique child, and it will have to be a simple Node::Val This function will return the val, or error in other case
- peek_
first_ node - Return a reference to first node
- split_
first_ nodes - Given a list of nodes, return the first and the rest on a tuple