{"modulePath":"github.com/thought-machine/please","version":"v13.4.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package parse\n\nPackage parse implements parsing of the BUILD files via an embedded Python interpreter.\n\nThe 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.\n\n## Functions\n\n```go\nfunc AllBuiltinFunctions(state *core.BuildState, labels []core.BuildLabel) map[string]*asp.FuncDef\n```\nAllBuiltinFunctions returns all the builtin functions, including those in a given set of labels.\n\n```go\nfunc InitParser(state *core.BuildState)\n```\nInitParser initialises the parser engine. This is guaranteed to be called exactly once before any calls to Parse().\n\n```go\nfunc Parse(tid int, state *core.BuildState, label, dependor core.BuildLabel, include, exclude []string, forSubinclude bool)\n```\nParse 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.\n\nBy 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.\n\n```go\nfunc PrintRuleArgs(state *core.BuildState, labels []core.BuildLabel)\n```\nPrintRuleArgs prints the arguments of all builtin rules (plus any associated ones from the given targets)\n\n","path":"github.com/thought-machine/please/src/parse","name":"parse","synopsis":"Package parse implements parsing of the BUILD files via an embedded Python interpreter.","isRedistributable":true}
