Lines Matching refs:Variable
24 // A Variable represents a global Ninja variable definition that will be written
25 // to the output .ninja file. A variable may contain references to other global
26 // Ninja variables, but circular variable references are not allowed.
27 type Variable interface {
59 variables map[string]Variable
68 variables: make(map[string]Variable),
84 // the name is valid and that the scope doesn't have a variable
103 func (s *basicScope) LookupVariable(name string) (Variable, error) {
106 // The variable name looks like "pkg.var"
108 return nil, fmt.Errorf("variable name %q ends with a '.'", name)
111 return nil, fmt.Errorf("variable name %q contains multiple '.' "+
130 return nil, fmt.Errorf("package %q does not contain variable %q",
136 // The variable name has no package part; just "var"
143 return nil, fmt.Errorf("undefined variable %q", name)
217 func (s *basicScope) AddVariable(v Variable) error {
221 return fmt.Errorf("variable %q is already defined in this scope", name)
267 func (s *localScope) LookupVariable(name string) (Variable, error) {
288 return nil, fmt.Errorf("local variable name %q contains '.'", name)