Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// Type represents the type of the node
Type tokens.TokenType `yaml:"token"`
// VariableType represents the type of the variable
VariableType tokens.VariableType `yaml:"variableType"`
// Content represents the content of the node
Content string `yaml:"content,omitempty"`
// Value represents the value of the node
Value any `yaml:"value,omitempty"`
// Reference is a bool to determine if the node is a reference
Reference bool `yaml:"reference,omitempty"`
// Children represents the children of the node
Children []*Node `yaml:"children,omitempty"`
// Args represents the arguments of the node
Args []*Node `yaml:"args,omitempty"`
// ObjectAccessors represents the object accessors of the node like x[0]
ObjectAccessors []*Node `yaml:"objectAccessors,omitempty"`
// Map is a key value store for the node
Map map[string]any `yaml:"map,omitempty"`
// Flags are custom operations for a node
Flags []string `yaml:"flags,omitempty"`
// Debug represents the debug information of the node
Debug *Debug `yaml:"-"`
}
Node represents a node in the AST
func (*Node) ValueString ¶
type Token ¶
type Token struct {
// TokenType is the type of the token
Type tokens.TokenType `yaml:"type"`
// Value is the value of the token
Value string `yaml:"value"`
// Map is a map of key value pairs
Map map[string]any `yaml:"map,omitempty"`
// Debug is a debug object
Debug *Debug `yaml:"-"`
}
Token represents a token in the lexer
Click to show internal directories.
Click to hide internal directories.