Documentation
¶
Index ¶
- func ExtractExpressions(value string) ([]Span, []Error)
- func Parse(input string) (Node, []Error)
- func Walk(node Node, fn func(Node) bool)
- type BinaryNode
- type Error
- type FilterNode
- type FunctionCallNode
- type IdentNode
- type IndexAccessNode
- type LiteralNode
- type Node
- type ParenNode
- type PropertyAccessNode
- type Span
- type Token
- type TokenKind
- type UnaryNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractExpressions ¶
ExtractExpressions finds all ${{ ... }} expression spans in the given value. It returns the spans and any extraction-level errors (e.g. unterminated expressions).
Types ¶
type BinaryNode ¶ added in v0.5.0
BinaryNode represents a binary operation (==, !=, &&, ||, <, <=, >, >=).
func (*BinaryNode) NodeOffset ¶ added in v0.5.0
func (n *BinaryNode) NodeOffset() int
type FilterNode ¶ added in v0.5.0
FilterNode represents a wildcard filter (e.g., steps.*.outcome).
func (*FilterNode) NodeOffset ¶ added in v0.5.0
func (n *FilterNode) NodeOffset() int
type FunctionCallNode ¶ added in v0.5.0
FunctionCallNode represents a function call (e.g., contains(a, b)).
func (*FunctionCallNode) NodeOffset ¶ added in v0.5.0
func (n *FunctionCallNode) NodeOffset() int
type IdentNode ¶ added in v0.5.0
IdentNode represents a bare identifier (e.g., "github", "matrix").
func (*IdentNode) NodeOffset ¶ added in v0.5.0
type IndexAccessNode ¶ added in v0.5.0
IndexAccessNode represents bracket access (e.g., matrix['os']).
func (*IndexAccessNode) NodeOffset ¶ added in v0.5.0
func (n *IndexAccessNode) NodeOffset() int
type LiteralNode ¶ added in v0.5.0
LiteralNode represents a literal value (string, int, float, true, false, null).
func (*LiteralNode) NodeOffset ¶ added in v0.5.0
func (n *LiteralNode) NodeOffset() int
type Node ¶ added in v0.5.0
type Node interface {
NodeOffset() int
// contains filtered or unexported methods
}
Node is the interface for all expression AST nodes. Every node carries an offset (byte position within the expression string).
type ParenNode ¶ added in v0.5.0
ParenNode represents a parenthesized expression.
func (*ParenNode) NodeOffset ¶ added in v0.5.0
type PropertyAccessNode ¶ added in v0.5.0
PropertyAccessNode represents dot access (e.g., github.actor).
func (*PropertyAccessNode) NodeOffset ¶ added in v0.5.0
func (n *PropertyAccessNode) NodeOffset() int