package
3.3.0+incompatible
Repository: https://github.com/google/agi.git
Documentation: pkg.go.dev

# Functions

Visit invokes visitor for all the children of the supplied node.

# Constants

# Variables

the map of valid boolean operators.
InvalidGeneric is a placeholder for an expected, but invalid generic.
InvalidIdentifier is a placeholder for an expected, but invalid identifier.
InvalidNumber is a placeholder for an expected, but invalid number.
InvalidString is a placeholder for an expected, but invalid string.
all valid operator strings, sorted in descending length order.
the map of valid unary operators.

# Structs

Abort is the AST node that represents «abort» statement.
Annotation is the AST node that represents «@name(arguments) constructs».
API is the root of the AST tree, and constitutes one entire parsed file.
Assign represents a «location {,+,-}= value» statement that assigns a value to an existing mutable location.
BinaryOp represents any binary operation applied to two expressions.
Block represents a linear sequence of statements, most often the contents of a {} pair.
Bool is used for the "true" and "false" keywords.
Branch represents an «"if" condition { trueblock } "else" { falseblock }» structure.
Call is an expression that invokes a function with a set of arguments.
Case represents a «"case" conditions: block» structure within a switch statement.
Class represents a class type declaration of the form «"class" name { fields }».
Clear is the AST node that represents «clear(map)» statement.
DeclareLocal represents a «name := value» statement that declares a new immutable local variable with the specified value and inferred type.
Default represents a «"default": block» structure within a switch statement.
Definition declares a new named literal, has the form «"define" name value».
Delete is the AST node that represents «delete(map, key)» statement.
Enum represents an enumerated type declaration, of the form «"enum" name [: type] { entries }» where entries is a comma separated list of «name = value».
EnumEntry represents a single value in an enumerated type.
Fence is the AST node that represents «fence» statement.
Field represents a field of a class or api, with the structure «type name = expression».
Function represents the declaration of a callable entity, any of "cmd", "sub" or "extern".
Generic represents a identifier modified by type arguments.
Group represents the «(expression)» construct, a single parenthesized expression.
Identifier holds a parsed identifier in the parse tree.
Import is the AST node that represents «import name "path"» constructs.
Imported represents an imported type name.
Index represents any expression of the form «object[index]» Used for arrays, maps and bitfields.
IndexedType represents a type declaration with an indexing suffix, which looks like «type[index]».
Invalid is used when an error was encountered in the parsing, but we want to keep going.
Iteration represents a «"for" variable "in" iterable { block }» structure.
MapIteration represents a «"for" i "," k "," v "in" map { block }» structure.
Mappings is a two-way map of AST nodes to semantic nodes.
Member represents an expression that access members of objects.
NamedArg represents a «name = value» expression as a function argument.
Null represents the null literal.
Number represents a typeless numeric constant.
Parameter represents a single parameter in the set of parameters for a Function.
PointerType represents a pointer type declaration, of the form «type*».
PreConst represents a pre-const type declaration, of the form «const type».
Pseudonym declares a new type in terms of another type.
Return represents the «"return" value» construct, that assigns the value to the result slot of the function.
String represents a quoted string constant.
Switch represents a «"switch" value { cases }» structure.
UnaryOp represents any unary operation applied to an expression.
Unknown represents the "?" construct.

# Interfaces

Node represents any AST-node type.

# Type aliases

Annotations represents the set of Annotation objects that apply to another AST node.