workflow

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const FlagV1 = 1

Flag constants – only V1 is used for now.

Variables

This section is empty.

Functions

func VisitNode

func VisitNode(exprNode Node, callback func(node Node))

Types

type BinaryNode

type BinaryNode struct {
	Op    string
	Left  Node
	Right Node
}

func (*BinaryNode) String

func (n *BinaryNode) String() string

String returns a string representation of the node.

type FunctionNode

type FunctionNode struct {
	Name string
	Args []Node
}

func (*FunctionNode) String

func (n *FunctionNode) String() string

String returns a string representation of the node.

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(expr string, flags int) *Lexer

NewLexer creates a new lexer for the given expression.

func (*Lexer) Next

func (l *Lexer) Next() *Token

Next returns the next token or nil if the end of the expression is reached.

func (*Lexer) UnclosedTokens

func (l *Lexer) UnclosedTokens() []TokenKind

UnclosedTokens returns the stack of unclosed start tokens.

type Node

type Node interface {
	String() string
}

func Parse

func Parse(expression string) (Node, error)

Parse parses the expression and returns the root node.

type OpToken

type OpToken struct {
	Token
	StartPos int
}

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

type Token

type Token struct {
	Kind  TokenKind
	Raw   string
	Value interface{}
	Index int
}

type TokenKind

type TokenKind int
const (
	TokenKindStartGroup TokenKind = iota
	TokenKindStartIndex
	TokenKindEndGroup
	TokenKindEndIndex
	TokenKindSeparator
	TokenKindDereference
	TokenKindWildcard
	TokenKindLogicalOperator
	TokenKindNumber
	TokenKindString
	TokenKindBoolean
	TokenKindNull
	TokenKindPropertyName
	TokenKindFunction
	TokenKindNamedValue
	TokenKindStartParameters
	TokenKindEndParameters
	TokenKindUnexpected
)

type UnaryNode

type UnaryNode struct {
	Op      string
	Operand Node
}

func (*UnaryNode) String

func (n *UnaryNode) String() string

String returns a string representation of the node.

type ValueNode

type ValueNode struct {
	Kind  TokenKind
	Value interface{}
}

func (*ValueNode) String

func (n *ValueNode) String() string

String returns a string representation of the node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL