loop

package
v0.102.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
const ID = "loop"

Variables

This section is empty.

Functions

func Bundle

func Bundle(_ map[string]string) compiler.Bundle

Types

type EachExpr added in v0.83.0

type EachExpr struct {
	Body        compiler.Expr
	Concurrency int
	Pos         compiler.Position
}

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 (*EachExpr) Build added in v0.83.0

func (*EachExpr) Children added in v0.83.0

func (e *EachExpr) Children() []compiler.Expr

func (*EachExpr) DescribeActionGraph added in v0.83.0

func (e *EachExpr) DescribeActionGraph() compiler.ActionGraphDescription

func (*EachExpr) Node added in v0.83.0

func (*EachExpr) Node()

func (*EachExpr) Position added in v0.83.0

func (e *EachExpr) Position() compiler.Position

Jump to

Keyboard shortcuts

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