types

package
v0.0.0-...-2eb2d68 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Zlib Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArrayExpr

type ArrayExpr struct {
	Position

	Exprs []Expression
}

func (ArrayExpr) Resolve

func (obj ArrayExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type ArrayValue

type ArrayValue struct {
	Position

	Values []Value
}

func (ArrayValue) Boolean

func (obj ArrayValue) Boolean() (bool, error)

func (ArrayValue) JSON

func (obj ArrayValue) JSON() any
func (obj ArrayValue) Link(resname string) error

type AttributeExpr

type AttributeExpr struct {
	Position

	Base Expression
	Name string
}

func (AttributeExpr) Resolve

func (obj AttributeExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type BooleanExpr

type BooleanExpr struct {
	Position

	Value bool
}

func (BooleanExpr) Boolean

func (obj BooleanExpr) Boolean() (bool, error)

func (BooleanExpr) JSON

func (obj BooleanExpr) JSON() any
func (obj BooleanExpr) Link(string) error

func (BooleanExpr) Resolve

func (obj BooleanExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type CallExpr

type CallExpr struct {
	Position

	Base Expression
	Args []Expression
}

func (CallExpr) Resolve

func (obj CallExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type ConditionExpr

type ConditionExpr struct {
	Position

	Cond  Expression
	Truly Expression
	Falsy Expression
}

func (ConditionExpr) JSON

func (obj ConditionExpr) JSON() any

func (ConditionExpr) Resolve

func (obj ConditionExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type DefineExpr

type DefineExpr struct {
	Position

	Define map[string]Expression
	Expr   Expression
}

func (DefineExpr) JSON

func (obj DefineExpr) JSON() any

func (DefineExpr) Resolve

func (obj DefineExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type Evaluator

type Evaluator struct {
	Force        bool
	DryRun       bool
	CacheDir     string
	LogDir       string
	Serial       bool
	Interpreter  string
	NoEvalOutput bool

	ParseFile func(filename PathExpr) (Expression, error)

	Outputs []string
}

type Expression

type Expression interface {
	Pos() string

	Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)
	// contains filtered or unexported methods
}

unresolved value

type IncludeExpr

type IncludeExpr struct {
	Position

	Name Expression
}

func (IncludeExpr) Resolve

func (obj IncludeExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type LambdaExpr

type LambdaExpr struct {
	Position

	Args []string
	Expr Expression
}

func (LambdaExpr) Boolean

func (obj LambdaExpr) Boolean() (bool, error)

func (LambdaExpr) JSON

func (obj LambdaExpr) JSON() any
func (obj LambdaExpr) Link(resultname string) error

func (LambdaExpr) Resolve

func (obj LambdaExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type MapExpr

type MapExpr struct {
	Position

	Extends []Expression
	Exprs   []Expression
}

func (MapExpr) Resolve

func (obj MapExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type MapValue

type MapValue struct {
	Position

	Values map[string]Value
}

func (MapValue) Boolean

func (obj MapValue) Boolean() (bool, error)

func (MapValue) JSON

func (obj MapValue) JSON() any
func (obj MapValue) Link(string) error

type NumberExpr

type NumberExpr struct {
	Position

	Value float64
}

func (NumberExpr) Boolean

func (obj NumberExpr) Boolean() (bool, error)

func (NumberExpr) JSON

func (obj NumberExpr) JSON() any
func (obj NumberExpr) Link(string) error

func (NumberExpr) Resolve

func (obj NumberExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type OperationExpr

type OperationExpr struct {
	Position

	Operator string
	Left     Expression
	Right    Expression
}

func (OperationExpr) JSON

func (obj OperationExpr) JSON() any

func (OperationExpr) Resolve

func (obj OperationExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type OutputExpr

type OutputExpr struct {
	Position

	Attrs Expression
}

func (OutputExpr) Resolve

func (obj OutputExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type PathExpr

type PathExpr struct {
	Position

	Name    string
	Depends []PathExpr
}

func (PathExpr) Boolean

func (obj PathExpr) Boolean() (bool, error)

func (PathExpr) JSON

func (obj PathExpr) JSON() any
func (obj PathExpr) Link(resname string) error

func (PathExpr) Resolve

func (obj PathExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type Position

type Position struct {
	Filename string
	Line     int
	Offset   int
}

func (Position) Pos

func (obj Position) Pos() string

func (Position) String

func (obj Position) String() string

type Scope

type Scope map[string]Variable

type StringExpr

type StringExpr struct {
	Position

	Content []string
	Interp  []Expression
}

func StringConstant

func StringConstant(content string, origin string) StringExpr

func (StringExpr) JSON

func (obj StringExpr) JSON() any

func (StringExpr) Resolve

func (obj StringExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type StringValue

type StringValue struct {
	Position

	Content string
}

func (StringValue) Boolean

func (obj StringValue) Boolean() (bool, error)

func (StringValue) JSON

func (obj StringValue) JSON() any
func (obj StringValue) Link(string) error

type Value

type Value interface {
	Pos() string

	Link(resultname string) error
	JSON() any
	Boolean() (bool, error)
	// contains filtered or unexported methods
}

resolved value

type VarExpr

type VarExpr struct {
	Position

	Name string
	Args []Expression
}

func (VarExpr) Resolve

func (obj VarExpr) Resolve(scope Scope, ev *Evaluator) (Value, []PathExpr, error)

type Variable

type Variable struct {
	Expr  Expression
	Scope Scope
}

Jump to

Keyboard shortcuts

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