parse

package
v13.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package parse implements parsing of the BUILD files via an embedded Python interpreter.

The actual work here is done by an embedded PyPy instance. Various rules are built in to the binary itself using go-bindata to embed the .py files; these are always available to all programs which is rather nice, but it does mean that must be run before 'go run' etc will work as expected.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllBuiltinFunctions

func AllBuiltinFunctions(state *core.BuildState, labels []core.BuildLabel) map[string]*asp.FuncDef

AllBuiltinFunctions returns all the builtin functions, including those in a given set of labels.

func InitParser

func InitParser(state *core.BuildState)

InitParser initialises the parser engine. This is guaranteed to be called exactly once before any calls to Parse().

func Parse

func Parse(tid int, state *core.BuildState, label, dependor core.BuildLabel, include, exclude []string, forSubinclude bool)

Parse parses the package corresponding to a single build label. The label can be :all to add all targets in a package. It is not an error if the package has already been parsed.

By default, after the package is parsed, any targets that are now needed for the build and ready to be built are queued, and any new packages are queued for parsing. When a specific label is requested this is straightforward, but when parsing for pseudo-targets like :all and ..., various flags affect it: 'include' and 'exclude' refer to the labels of targets to be added. If 'include' is non-empty then only targets with at least one matching label are added. Any targets with a label in 'exclude' are not added. 'forSubinclude' is set when the parse is required for a subinclude target so should proceed even when we're not otherwise building targets.

func PrintRuleArgs

func PrintRuleArgs(state *core.BuildState, labels []core.BuildLabel)

PrintRuleArgs prints the arguments of all builtin rules (plus any associated ones from the given targets)

Types

This section is empty.

Directories

Path Synopsis
asp
Package asp implements an experimental BUILD-language parser.
Package asp implements an experimental BUILD-language parser.
fuzz
Package fuzz implements a fuzzing entry point for asp using go-fuzz.
Package fuzz implements a fuzzing entry point for asp using go-fuzz.
main
Package main implements a compiler for the builtin build rules, which is used at bootstrap time.
Package main implements a compiler for the builtin build rules, which is used at bootstrap time.

Jump to

Keyboard shortcuts

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