Documentation
¶
Overview ¶
Package syntax ships the standard binary operators every .nflow file relies on: ->, &, ||, plus the structured parallel and race forms.
The package is a native bundle — always mounted by native.Bundles() and never requires @require. It lives under extensions/ rather than compiler/ so the compiler remains a pure mechanism: the parser knows how to call an operator, not what a pipe means.
Index ¶
- Constants
- func Bundle(_ map[string]string) compiler.Bundle
- type IfExpr
- func (e *IfExpr) Analyze(resolver compiler.CapabilityResolver) error
- func (e *IfExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
- func (e *IfExpr) Build(ctx context.Context, bCtx *compiler.BuildContext) (action.AnyAction, error)
- func (e *IfExpr) Children() []compiler.Expr
- func (e *IfExpr) DescribeActionGraph() compiler.ActionGraphDescription
- func (*IfExpr) Node()
- func (e *IfExpr) Position() compiler.Position
- type NamedParallelExpr
- func (e *NamedParallelExpr) Analyze(resolver compiler.CapabilityResolver) error
- func (e *NamedParallelExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
- func (e *NamedParallelExpr) Build(ctx context.Context, bCtx *compiler.BuildContext) (action.AnyAction, error)
- func (e *NamedParallelExpr) Children() []compiler.Expr
- func (e *NamedParallelExpr) DescribeActionGraph() compiler.ActionGraphDescription
- func (*NamedParallelExpr) Node()
- type RaceExpr
- func (e *RaceExpr) Analyze(resolver compiler.CapabilityResolver) error
- func (e *RaceExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
- func (e *RaceExpr) Build(ctx context.Context, bCtx *compiler.BuildContext) (action.AnyAction, error)
- func (e *RaceExpr) Children() []compiler.Expr
- func (e *RaceExpr) DescribeActionGraph() compiler.ActionGraphDescription
- func (*RaceExpr) Node()
Constants ¶
const ID = "syntax"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IfExpr ¶ added in v0.82.0
type IfExpr struct {
Condition string
ConditionPos compiler.Position
Then compiler.Expr
Else compiler.Expr
Pos compiler.Position
}
IfExpr evaluates its condition as a strict bool and runs only the selected Flow branch. An absent else branch returns the current input unchanged.
func (*IfExpr) Analyze ¶ added in v0.82.0
func (e *IfExpr) Analyze(resolver compiler.CapabilityResolver) error
func (*IfExpr) AnalyzeTypes ¶ added in v0.82.0
func (e *IfExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
func (*IfExpr) DescribeActionGraph ¶ added in v0.82.0
func (e *IfExpr) DescribeActionGraph() compiler.ActionGraphDescription
type NamedParallelExpr ¶ added in v0.14.0
type NamedParallelExpr struct {
// contains filtered or unexported fields
}
NamedParallelExpr runs expressions concurrently and returns results keyed by the explicit labels in its source block.
func (*NamedParallelExpr) Analyze ¶ added in v0.14.0
func (e *NamedParallelExpr) Analyze(resolver compiler.CapabilityResolver) error
func (*NamedParallelExpr) AnalyzeTypes ¶ added in v0.76.0
func (e *NamedParallelExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
func (*NamedParallelExpr) Build ¶ added in v0.14.0
func (e *NamedParallelExpr) Build(ctx context.Context, bCtx *compiler.BuildContext) (action.AnyAction, error)
func (*NamedParallelExpr) Children ¶ added in v0.14.0
func (e *NamedParallelExpr) Children() []compiler.Expr
func (*NamedParallelExpr) DescribeActionGraph ¶ added in v0.23.0
func (e *NamedParallelExpr) DescribeActionGraph() compiler.ActionGraphDescription
func (*NamedParallelExpr) Node ¶ added in v0.14.0
func (*NamedParallelExpr) Node()
type RaceExpr ¶ added in v0.30.0
type RaceExpr struct {
// contains filtered or unexported fields
}
RaceExpr runs its candidates concurrently and returns Kernel's first successful result. Kernel cancels the remaining candidates on success and joins all launched work before returning.
func (*RaceExpr) Analyze ¶ added in v0.30.0
func (e *RaceExpr) Analyze(resolver compiler.CapabilityResolver) error
func (*RaceExpr) AnalyzeTypes ¶ added in v0.76.0
func (e *RaceExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
func (*RaceExpr) DescribeActionGraph ¶ added in v0.30.0
func (e *RaceExpr) DescribeActionGraph() compiler.ActionGraphDescription