syntax

package
v0.93.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 9 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 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

View Source
const ID = "syntax"

Variables

This section is empty.

Functions

func Bundle

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

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

func (e *IfExpr) Build(ctx context.Context, bCtx *compiler.BuildContext) (action.AnyAction, error)

func (*IfExpr) Children added in v0.82.0

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

func (*IfExpr) DescribeActionGraph added in v0.82.0

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

func (*IfExpr) Node added in v0.82.0

func (*IfExpr) Node()

func (*IfExpr) Position added in v0.82.0

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

Position exposes the if keyword's source location to compiler plans.

func (*IfExpr) RewriteCompileTimeExpressions added in v0.92.0

func (e *IfExpr) RewriteCompileTimeExpressions(rewrite func(string, compiler.Position) (string, error)) error

RewriteCompileTimeExpressions updates the condition checked during analysis and execution.

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

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

func (*RaceExpr) Children added in v0.30.0

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

func (*RaceExpr) DescribeActionGraph added in v0.30.0

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

func (*RaceExpr) Node added in v0.30.0

func (*RaceExpr) Node()

Jump to

Keyboard shortcuts

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