package
0.0.0-20240123034106-c922539f001c
Repository: https://github.com/acorn-io/aml.git
Documentation: pkg.go.dev
# Functions
AddComment adds the given comment to the node if it supports it.
Comments returns all comments associated with a given node.
IsValidIdent reports whether str is a valid identifier.
SetComments replaces all comments of n with the given set of comments.
SetRelPos sets the relative position of a node without modifying its file position.
Walk traverses an AST in depth-first order: It starts by calling f(node); node must not be nil.
# Structs
A BadDecl node is a placeholder for declarations containing syntax errors for which no correct declaration nodes can be created.
A BadExpr node is a placeholder for expressions containing syntax errors for which no correct expression nodes can be created.
A BasicLit node represents a literal of basic type.
A BinaryExpr node represents a binary expression.
A CallExpr node represents an expression followed by an argument list.
A Comment node represents a single //-style.
A CommentGroup represents a sequence of comments with no other tokens and no empty lines between.
No description provided by the author
An Else node represents an else or else if expression after an if expression.
An EmbedDecl node represents a single expression used as a declaration.
A Field represents a field declaration in a struct.
A File node represents a Go source file.
A For node represents a for expression.
A ForClause node represents a for clause in a comprehension.
A Func node represents a function expression.
An Ident node represents an left-hand side identifier,.
A If node represents an if expression.
A IfClause node represents an if guard clause in a comprehension.
An IndexExpr node represents an expression followed by an index.
No description provided by the author
A Lambda node represents a lambda function expression.
A LetClause node represents a let clause in a comprehension.
A ListComprehension node represents literal list with and embedded for expression.
A ListLit node represents a literal list.
A ParenExpr node represents a parenthesized expression.
A SchemaLit node represents a literal schema definition.
A SelectorExpr node represents an expression followed by a selector.
An SliceExpr node represents an expression followed by slice indices.
A StructLit node represents a literal struct.
A UnaryExpr node represents a unary expression.