Lines Matching refs:Variable
28 // package-scoped PackageContext variable that it uses to create all package-
60 StaticVariable(name, value string) Variable
61 VariableFunc(name string, f func(config interface{}) (string, error)) Variable
62 VariableConfigMethod(name string, method interface{}) Variable
94 // function or as part of a package-scoped variable initialization.
195 // "${pkg.Variable}", while the imported rules can simply be accessed as
218 // Note that the local name used to refer to the package in Ninja variable names
263 // StaticVariable returns a Variable whose value does not depend on any
266 // scoped variable's initialization.
268 // This function is usually used to initialize a package-scoped Go variable that
269 // represents a Ninja variable that will be output. The name argument should
270 // exactly match the Go variable name, and the value string may reference other
272 func (p *packageContext) StaticVariable(name, value string) Variable {
303 err = fmt.Errorf("error parsing variable %s value: %s", v, err)
319 // VariableFunc returns a Variable whose value is determined by a function that
320 // takes a config object as input and returns either the variable value or an
322 // from the init() function or as part of a package-scoped variable's
325 // This function is usually used to initialize a package-scoped Go variable that
326 // represents a Ninja variable that will be output. The name argument should
327 // exactly match the Go variable name, and the value string returned by f may
331 f func(config interface{}) (string, error)) Variable {
349 // VariableConfigMethod returns a Variable whose value is determined by calling
351 // a single string that will be the variable's value. It may only be called
353 // part of a package-scoped variable's initialization.
355 // This function is usually used to initialize a package-scoped Go variable that
356 // represents a Ninja variable that will be output. The name argument should
357 // exactly match the Go variable name, and the value string returned by method
361 method interface{}) Variable {
408 err = fmt.Errorf("error parsing variable %s value: %s", v, err)
422 panic(fmt.Errorf("method given for variable %s is not a function",
426 panic(fmt.Errorf("method for variable %s has %d inputs (should be 1)",
430 panic(fmt.Errorf("method for variable %s has %d outputs (should be 1)",
434 panic(fmt.Errorf("method for variable %s does not return a string",
439 // An argVariable is a Variable that exists only when it is set by a build
476 // either from the init() function or as part of a package-scoped Go variable's
479 // This function is usually used to initialize a package-scoped Go variable that
481 // exactly match the Go variable name, and the params fields may reference other
533 // init() function or as part of a package-scoped variable's initialization.
535 // This function is usually used to initialize a package-scoped Go variable that
537 // exactly match the Go variable name, and the string fields of the PoolParams
629 // either from the init() function or as part of a package-scoped Go variable's
632 // This function is usually used to initialize a package-scoped Go variable that
634 // exactly match the Go variable name, and the params fields may reference other
641 // those defined in another package. Shadowing a package-scoped variable
642 // results in the package-scoped variable's value being used for build
705 // shadow a package-scoped variable with an arg variable.
735 // init() function or as part of a package-scoped variable's initialization.
737 // This function is usually used to initialize a package-scoped Go variable that
739 // exactly match the Go variable name, and the string fields of the RuleParams
748 // scoped variable results in the package-scoped variable's value being used for
815 // global variable with an arg variable.