fluxlang

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Overview

Package language exposes the flux parser as an interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FluxLanguageService added in v2.1.0

type FluxLanguageService interface {
	// Parse will take flux source code and produce a package.
	// If there are errors when parsing, the first error is returned.
	// An ast.Package may be returned when a parsing error occurs,
	// but it may be null if parsing didn't even occur.
	Parse(source string) (*ast.Package, error)

	// Format will produce a string for the given *ast.File.
	Format(f *ast.File) (string, error)

	// EvalAST will evaluate and run an AST.
	EvalAST(ctx context.Context, astPkg *ast.Package) ([]interpreter.SideEffect, values.Scope, error)

	// Completer will return a flux completer.
	Completer() complete.Completer
}

FluxLanguageService is a service for interacting with flux code.

var DefaultService FluxLanguageService = defaultService{}

DefaultService is the default language service.

type SourceQuery added in v2.1.0

type SourceQuery struct {
	Query string `json:"query"`
	Type  string `json:"type"`
}

SourceQuery is a query for a source.

Jump to

Keyboard shortcuts

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