Documentation
¶
Overview ¶
Package loop provides the `loop(body) until(cond)` and `each { body }` keywords. They are KeywordPrimaries dispatched by the parser when this bundle is registered.
Typical use:
{ n: 0 } -> loop( { n: .n + 1 } ) until( .n >= 3 )
pick @{ field: "samples" } -> each :concurrency=4 { analyze_sample }
DSL fixtures live under nflows/ and are discovered by compiler.Bundle.AllSelfTests; there is no inline SelfTest.
Index ¶
- Constants
- func Bundle(_ map[string]string) compiler.Bundle
- type EachExpr
- func (e *EachExpr) Analyze(resolver compiler.CapabilityResolver) error
- func (e *EachExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
- func (e *EachExpr) Build(ctx context.Context, bCtx *compiler.BuildContext) (action.AnyAction, error)
- func (e *EachExpr) Children() []compiler.Expr
- func (e *EachExpr) DescribeActionGraph() compiler.ActionGraphDescription
- func (*EachExpr) Node()
- func (e *EachExpr) Position() compiler.Position
Constants ¶
const ID = "loop"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EachExpr ¶ added in v0.83.0
EachExpr maps its body over the current list, with isolated expression bindings for each item and the surrounding input scope inherited read-only.
func (*EachExpr) Analyze ¶ added in v0.83.0
func (e *EachExpr) Analyze(resolver compiler.CapabilityResolver) error
func (*EachExpr) AnalyzeTypes ¶ added in v0.83.0
func (e *EachExpr) AnalyzeTypes(ctx compiler.TypeAnalysisContext) (compiler.TypeDescriptor, error)
func (*EachExpr) DescribeActionGraph ¶ added in v0.83.0
func (e *EachExpr) DescribeActionGraph() compiler.ActionGraphDescription