Expand description
Box language concrete syntax tree (CST).
This module contains two representations of the Box CST.
The type Tree is an explicit representation of a CST.
It consists of Rust vectors of function calls (FuncCall).
These calls contain Rust vectors of arguments (Arg).
Some of these arguments may, in turn, contain nested trees if the argument
is a list type.
The explicit representation is easy to use, but is inefficient
and makes using the CST a costly abstraction.
The alternative representation is an iterator representation,
based on two traits TreeIter and ArgsIter.
With this representation, instead of materializing the CST at once
with a type like a Tree, calling code instead iterates
over the tree.
Structs§
Enums§
- Args
Item - Item returned by
ArgsIter. - Tree
Item - Item returned by
TreeIter. - Value
- The value of an argument to a function.
Traits§
Functions§
- parse
- Parse Box language source code into a CST.
- parse_
using_ lexer - Parse into a CST using an explicitly provided lexer.
- pretty_
print - Pretty print a Box CST.