Home | History | Annotate | Download | only in gn

Lines Matching refs:scope

17 #include "tools/gn/scope.h"
24 const Scope* scope,
26 if (scope->IsProcessingImport()) {
37 const Scope* scope,
39 if (scope->IsProcessingBuildConfig()) {
48 bool FillTargetBlockScope(const Scope* scope,
53 Scope* block_scope,
60 // Copy the target defaults, if any, into the scope we're going to execute
62 const Scope* default_scope = scope->GetTargetDefaults(target_type);
64 Scope::MergeOptions merge_options;
101 const Label& ToolchainLabelForScope(const Scope* scope) {
102 return scope->settings()->toolchain_label();
105 Label MakeLabelForScope(const Scope* scope,
108 const Label& toolchain_label = ToolchainLabelForScope(scope);
109 return Label(scope->GetSourceDir(), name, toolchain_label.dir(),
133 Value RunAssert(Scope* scope,
224 Scope* scope,
227 !EnsureNotProcessingImport(function, scope, err))
230 Label label(MakeLabelForScope(scope, function, args[0].string_value()));
236 scoped_ptr<Config> config(new Config(scope->settings(), label));
238 if (!Visibility::FillItemVisibility(config.get(), scope, err))
242 const SourceDir& input_dir = scope->GetSourceDir();
243 ConfigValuesGenerator gen(&config->config_values(), scope, input_dir, err);
249 Scope::ItemVector* collector = scope->GetItemCollector();
267 " Introduces the given arguments into the current scope. If they are\n"
285 Value RunDeclareArgs(Scope* scope,
290 Scope block_scope(scope);
295 // Pass the values from our scope into the Args object for adding to the
296 // scope with the proper values (taking into account the defaults given in
298 Scope::KeyValueMap values;
300 scope->settings()->build_settings()->build_args().DeclareArgs(
301 values, scope, err);
319 " the current scope.\n"
321 " You can also check a named scope:\n"
324 " named scope foo. It will throw an error if foo is defined but is not\n"
325 " a scope.\n"
342 Value RunDefined(Scope* scope,
356 if (scope->GetValue(identifier->value().value()))
365 // The base of the accessor must be a scope if it's defined.
366 const Value* base = scope->GetValue(accessor->base().value());
369 if (!base->VerifyTypeIs(Value::SCOPE, err))
372 // Check the member inside the scope to see if its defined.
408 Value RunGetEnv(Scope* scope,
427 "import: Import a file into the current scope.";
429 "import: Import a file into the current scope.\n"
432 " executing the given file into the current scope.\n"
445 " The imported file's scope will be merged with the scope at the point\n"
446 " import was called. If there is a conflict (both the current scope and\n"
462 Value RunImport(Scope* scope,
469 const SourceDir& input_dir = scope->GetSourceDir();
472 scope->settings()->import_manager().DoImport(import_file, function,
473 scope, err);
500 " list of filters. This will apply until the current scope exits\n"
506 Value RunSetSourcesAssignmentFilter(Scope* scope,
516 scope->set_sources_assignment_filter(f.Pass());
543 Value RunPrint(Scope* scope,
556 scope->settings()->build_settings()->print_callback();
688 Value RunFunction(Scope* scope,
701 scope->GetTemplate(function->function().value().as_string());
703 Value args = args_list->Execute(scope, err);
706 return templ->Invoke(scope, function, args.list_value(), block, err);
715 scope, function, args_list, err);
719 Value args = args_list->Execute(scope, err);
729 scope, function, args.list_value(), block, err);
738 Scope block_scope(scope);
747 return found_function->second.no_block_runner(scope, function,