Help us shape the future of Go! Take the 2026 Go Developer Survey

compiler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 5 Imported by: 23

Documentation

Overview

nexssp/flow/compiler/ast.go

nexssp/flow/compiler/token.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomExpr

type AtomExpr struct {
	Name      string            // e.g. "github.issue"
	Profile   string            // from :arch
	Prompt    string            // from @security
	Targets   []string          // from #pkg
	Excludes  []string          // from ~testdata
	Params    map[string]string // from (code=pack.content)
	Inputs    map[string]string // from (code=pack.content) – same as params but semantic
	Modifiers []string          // from :retry=3 :idempotent
}

type ConditionalExpr

type ConditionalExpr struct {
	Gate   Expr
	Target Expr
}

type Expr

type Expr interface {
	Node
	// contains filtered or unexported methods
}

Expr is the root of all expression nodes.

type FallbackExpr

type FallbackExpr struct {
	Left  Expr
	Right Expr
}

type Lexer

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

func NewLexer

func NewLexer(input string) *Lexer

func (*Lexer) Next

func (l *Lexer) Next() Token

type LoopExpr

type LoopExpr struct {
	Body  Expr
	Until string
}

LoopExpr represents an autonomous multi-turn bounded loop execution block

type Node

type Node interface {
	// contains filtered or unexported methods
}

type ParallelExpr

type ParallelExpr struct {
	Children []Expr
}

type Parser

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

func NewParser

func NewParser(input string) *Parser

func (*Parser) ParseExpression

func (p *Parser) ParseExpression() (Expr, error)

type PipelineExpr

type PipelineExpr struct {
	Left  Expr
	Right Expr
}

type ProjectionExpr

type ProjectionExpr struct {
	Raw string // e.g. `prompt: "hello" + name`
}

ProjectionExpr holds the raw content inside { ... }. We keep it as a raw string – expr-lang will parse it later.

type Token

type Token struct {
	Type   TokenType
	Lit    string
	Line   int
	Col    int
	Offset int
}

type TokenType

type TokenType int
const (
	TokenEOF TokenType = iota
	TokenIdent
	TokenString
	TokenNumber
	TokenArrow     // ->
	TokenPipe      // |
	TokenOr        // ||
	TokenAmpersand // &
	TokenLParen
	TokenRParen
	TokenLBrace
	TokenRBrace
	TokenQuestion // ?
	TokenColon    // :
	TokenAssign   // =
	TokenAt       // @
	TokenHash     // #
	TokenTilde    // ~
	TokenComma
	TokenInvalid
)

func (TokenType) String

func (t TokenType) String() string

Jump to

Keyboard shortcuts

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