pub enum NodeType {
Show 17 variants
BoolTrue,
BoolFalse,
Number,
Char,
String,
MultilineString,
Tuple,
List,
TupleSet,
EmptySet,
Label,
VariantWithPayload,
OptionSome,
OptionNone,
ResultOk,
ResultErr,
Flags,
}Expand description
The type of a WAVE AST Node.
Variants§
BoolTrue
Boolean true
BoolFalse
Boolean false
Number
Number
May be an integer or float, including nan, inf, -inf
Char
Char Span includes delimiters.
String
String Span includes delimiters.
MultilineString
Multiline String Span includes delimiters.
Tuple
Tuple Child nodes are the tuple values.
List
List Child nodes are the list values.
TupleSet
Record or map, e.g. {a: 1}, {"a": 1} or {:}
Child nodes are key, value pairs, e.g.
[<key 1>, <value 1>, <key 2>, <value 2>, ...]
Keys are Label, Number, Char, String or MultilineString nodes. A
Label key is a record field, or, unprefixed true or false, a
bool map key. Which of the two this node represents depends on the
type it is converted to.
EmptySet
Empty braces, {}
Represents empty flags or an empty map. Has no child nodes.
Label
Label In value position may represent an enum value or variant case (without payload).
VariantWithPayload
Variant case with payload Child nodes are variant case Label and payload value.
OptionSome
Option some
Child node is the payload value.
OptionNone
Option none
ResultOk
Result ok
Has zero or one child node for the payload value.
ResultErr
Result err
Has zero or one child node for the payload value.
Flags
Flags
Child nodes are flag Labels. Empty flags ({}) are an
NodeType::EmptySet.