package
0.1.0
Repository: https://github.com/grafana/alloy.git
Documentation: pkg.go.dev

# Functions

EndPos returns the position of the final character in a Node.
StartPos returns the position of the first character belonging to a Node.
Walk traverses an AST in depth-first order: it starts by calling v.Visit(node); node must not be nil.

# Structs

AccessExpr accesses a field in an object value by name.
ArrayExpr is an array of values.
AttributeStmt is a key-value pair being set in a Body or BlockStmt.
BinaryExpr performs a binary operation against two values.
BlockStmt declares a block.
CallExpr invokes a function value with a set of arguments.
A Comment represents a single line or block comment.
File is a parsed file.
Ident holds an identifier with its position.
IdentifierExpr refers to a named value.
IndexExpr accesses an index in an array value.
LiteralExpr is a constant value of a specific token kind.
ObjectExpr declares an object of key-value pairs.
ObjectField defines an individual key-value pair within an object.
ParenExpr represents an expression wrapped in parentheses.
UnaryExpr performs a unary operation on a single value.

# Interfaces

Expr is an expression within the AST.
Node represents any node in the AST.
Stmt is a type of statement within the body of a file or block.
A Visitor has its Visit method invoked for each node encountered by Walk.

# Type aliases

Body is a list of statements.
A CommentGroup represents a sequence of comments that are not separated by any empty lines or other non-comment tokens.