Lines Matching refs:s

167 func (s *singletonContext) Config() interface{} {
168 return s.config
171 func (s *singletonContext) Name() string {
172 return s.name
175 func (s *singletonContext) ModuleName(logicModule Module) string {
176 return s.context.ModuleName(logicModule)
179 func (s *singletonContext) ModuleDir(logicModule Module) string {
180 return s.context.ModuleDir(logicModule)
183 func (s *singletonContext) ModuleSubDir(logicModule Module) string {
184 return s.context.ModuleSubDir(logicModule)
187 func (s *singletonContext) ModuleType(logicModule Module) string {
188 return s.context.ModuleType(logicModule)
191 func (s *singletonContext) BlueprintFile(logicModule Module) string {
192 return s.context.BlueprintFile(logicModule)
195 func (s *singletonContext) error(err error) {
197 s.errs = append(s.errs, err)
201 func (s *singletonContext) ModuleErrorf(logicModule Module, format string,
204 s.error(s.context.ModuleErrorf(logicModule, format, args...))
207 func (s *singletonContext) Errorf(format string, args ...interface{}) {
209 s.error(fmt.Errorf(format, args...))
212 func (s *singletonContext) Failed() bool {
213 return len(s.errs) > 0
216 func (s *singletonContext) Variable(pctx PackageContext, name, value string) {
217 s.scope.ReparentTo(pctx)
219 v, err := s.scope.AddLocalVariable(name, value)
224 s.actionDefs.variables = append(s.actionDefs.variables, v)
227 func (s *singletonContext) Rule(pctx PackageContext, name string,
230 s.scope.ReparentTo(pctx)
232 r, err := s.scope.AddLocalRule(name, &params, argNames...)
237 s.actionDefs.rules = append(s.actionDefs.rules, r)
242 func (s *singletonContext) Build(pctx PackageContext, params BuildParams) {
243 s.scope.ReparentTo(pctx)
245 def, err := parseBuildParams(s.scope, &params)
250 s.actionDefs.buildDefs = append(s.actionDefs.buildDefs, def)
253 func (s *singletonContext) Eval(pctx PackageContext, str string) (string, error) {
254 s.scope.ReparentTo(pctx)
256 ninjaStr, err := parseNinjaString(s.scope, str)
261 err = s.globals.addNinjaStringDeps(ninjaStr)
266 return ninjaStr.Eval(s.globals.variables)
269 func (s *singletonContext) RequireNinjaVersion(major, minor, micro int) {
270 s.context.requireNinjaVersion(major, minor, micro)
273 func (s *singletonContext) SetNinjaBuildDir(pctx PackageContext, value string) {
274 s.scope.ReparentTo(pctx)
276 ninjaValue, err := parseNinjaString(s.scope, value)
281 s.context.setNinjaBuildDir(ninjaValue)
284 func (s *singletonContext) AddSubninja(file string) {
285 s.context.subninjas = append(s.context.subninjas, file)
288 func (s *singletonContext) VisitAllModules(visit func(Module)) {
293 funcName(visit), s.context.moduleInfo[visitingModule]))
297 s.context.VisitAllModules(func(m Module) {
303 func (s *singletonContext) VisitAllModulesIf(pred func(Module) bool,
306 s.context.VisitAllModulesIf(pred, visit)
309 func (s *singletonContext) VisitDirectDeps(module Module, visit func(Module)) {
310 s.context.VisitDirectDeps(module, visit)
313 func (s *singletonContext) VisitDirectDepsIf(module Module, pred func(Module) bool, visit func(Modu…
314 s.context.VisitDirectDepsIf(module, pred, visit)
317 func (s *singletonContext) VisitDepsDepthFirst(module Module,
320 s.context.VisitDepsDepthFirst(module, visit)
323 func (s *singletonContext) VisitDepsDepthFirstIf(module Module,
326 s.context.VisitDepsDepthFirstIf(module, pred, visit)
329 func (s *singletonContext) PrimaryModule(module Module) Module {
330 return s.context.PrimaryModule(module)
333 func (s *singletonContext) FinalModule(module Module) Module {
334 return s.context.FinalModule(module)
337 func (s *singletonContext) VisitAllModuleVariants(module Module, visit func(Module)) {
338 s.context.VisitAllModuleVariants(module, visit)
341 func (s *singletonContext) AddNinjaFileDeps(deps ...string) {
342 s.ninjaFileDeps = append(s.ninjaFileDeps, deps...)
345 func (s *singletonContext) GlobWithDeps(pattern string,
347 return s.context.glob(pattern, excludes)
350 func (s *singletonContext) Fs() pathtools.FileSystem {
351 return s.context.fs