summaryrefslogtreecommitdiffstats
path: root/tools/gn/scope.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 19:42:25 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-13 19:42:25 +0000
commit92cafe5dc2d3e204575a8de4e1d6a7e53c00d6b8 (patch)
tree6ce288bc1c97b0ff80454c3b34d271d7d266ef7f /tools/gn/scope.h
parente7b3c2cd665261388c5d3407963ad68ba641f3ca (diff)
downloadchromium_src-92cafe5dc2d3e204575a8de4e1d6a7e53c00d6b8.zip
chromium_src-92cafe5dc2d3e204575a8de4e1d6a7e53c00d6b8.tar.gz
chromium_src-92cafe5dc2d3e204575a8de4e1d6a7e53c00d6b8.tar.bz2
Add a foreach function to GN.
This adds a foreach function for iterating over lists. See documentation included in the help added in this patch. BUG= R=dpranke@chromium.org Review URL: https://codereview.chromium.org/271403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270172 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/scope.h')
-rw-r--r--tools/gn/scope.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/gn/scope.h b/tools/gn/scope.h
index 1b0246d..53b3252 100644
--- a/tools/gn/scope.h
+++ b/tools/gn/scope.h
@@ -134,6 +134,10 @@ class Scope {
const Value& v,
const ParseNode* set_node);
+ // Removes the value with the given identifier if it exists on the current
+ // scope. This does not search recursive scopes. Does nothing if not found.
+ void RemoveIdentifier(const base::StringPiece& ident);
+
// Templates associated with this scope. A template can only be set once, so
// AddTemplate will fail and return false if a rule with that name already
// exists. GetTemplate returns NULL if the rule doesn't exist, and it will