From afb30e39c6791afed6cd12f085649400e4d80ae8 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Fri, 16 May 2014 19:31:36 +0000 Subject: Support private values in GN. This adds special handling for variables that begin with underscores, which is inspired by Dart. Such variables are not imported when doing an import, which gives .gni files a way to have intermediate private variables that won't pollute the scopes of the files that include them. This also applies to the root build config, which can have private values now. Adds some missing unused variable checks. This was disabled because processing imports would mean all imported variables were unused, and files not using all of them would get unused variable errors. This adds the option to mark merged values on a scope as used, which is used for imported values. BUG=341738 R=cjhopman@chromium.org Review URL: https://codereview.chromium.org/287693002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271078 0039d316-1c4b-4281-b951-d872f2087c98 --- tools/gn/parse_tree.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/gn/parse_tree.cc') diff --git a/tools/gn/parse_tree.cc b/tools/gn/parse_tree.cc index 4015fd1..00fca54 100644 --- a/tools/gn/parse_tree.cc +++ b/tools/gn/parse_tree.cc @@ -217,7 +217,7 @@ Value BlockNode::Execute(Scope* containing_scope, Err* err) const { return Value(); // Check for unused vars in the scope. - //our_scope.CheckForUnusedVars(err); + our_scope.CheckForUnusedVars(err); return ret; } return ExecuteBlockInScope(containing_scope, err); -- cgit v1.1