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
SourceQuery is a query for a source.
Click to show internal directories.
Click to hide internal directories.