Help us shape the future of Go! Take the 2026 Go Developer Survey

nexssflow

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

Nexss Flow adapter

The adapter is the Go package github.com/nexssp/lang/nexssflow. Add it through Flow's existing @require workflow and pin a released tag (replace vX.Y.Z with an existing version):

@require github.com/nexssp/lang/nexssflow vX.Y.Z

For a local checkout, point to the repository directory relative to the .nflow file, for example @require ../nexssp-lang. Flow resolves the nexssflow/ package, whose factory exposes bundle ID lang; no change to the existing @require mechanism is required.

The adapter owns bundle registration, language and file-keyword syntax, lowering to Flow AST nodes, preflight integration, and mapping Flow values to runner stdin/stdout. The lang root package owns runner profiles and interpreter execution.

Runner profiles are exported as source modules. They use Flow's @description metadata and @symbols runner for a local, checked copy of the canonical runner ID. Starter templates are regular package-embedded source assets: Flow's @embed contract exposes typed asset references, not raw source strings.

Existing adapter fixtures are embedded from nflows/.

Documentation

Overview

Package nexssflow adapts github.com/nexssp/lang to Nexss Flow's compiler, AST, bundle registry, subprocess action, and @require mechanism.

Package nexssflow — Flow parser integration.

Index

Constants

View Source
const ID = "lang"

ID is the stable @require bundle name.

Variables

View Source
var DefineDirective = compiler.Directive{
	Name: "lang.define",
	Example: `@lang.define "gleam" {
  ext: ".gleam"
  aliases: ["gleam"]
  find: ["gleam run"]
}`,
	Handler: handleDefineDirective,
}

DefineDirective registers an interpreter available to the current process.

View Source
var RunnerDirective = compiler.Directive{
	Name: "lang.runner",
	Example: `@lang.runner "python" {
  ext: ".py"
  aliases: ["py", "python"]
  find: ["python3", "python"]
}`,
	Handler: handleRunnerDirective,
}

RunnerDirective registers a data-driven runner declared in a Flow source.

Functions

func Bundle

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

Bundle wires language directives, keyword primaries, preflight validation, runner source modules, and existing conformance fixtures into Flow.

func WithAutoInstallDisabled

func WithAutoInstallDisabled(ctx context.Context) context.Context

WithAutoInstallDisabled is the adapter-level convenience wrapper used by compile/test hosts that must never invoke a package manager.

func WithPreflightDisabled

func WithPreflightDisabled(ctx context.Context) context.Context

WithPreflightDisabled marks a compile-only context that must not probe external interpreters. It is intended for syntax-only compilation, not run.

Types

type LangBlock

type LangBlock struct {
	ID         string
	Version    string
	Source     string
	Tag        string
	SourceFile string
	Pos        compiler.Position
}

func ParseFileTag

func ParseFileTag(tag, sourceFile, source string, pos compiler.Position) (*LangBlock, error)

ParseFileTag creates a block backed by a source file. The caller resolves the path relative to the containing .nflow source and provides file contents.

func ParseTag

func ParseTag(tag, source string, pos compiler.Position) (*LangBlock, error)

ParseTag resolves a Flow language keyword to a canonical language block. Interpreter availability remains the responsibility of preflight.

Jump to

Keyboard shortcuts

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