Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: tools/gn/parser.h

Issue 2187523003: Allow creation and modification of scopes in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/parse_tree_unittest.cc ('k') | tools/gn/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/parser.h
diff --git a/tools/gn/parser.h b/tools/gn/parser.h
index de828a4ecdffddf78616b4331b489a8a3a648842..29580da2b4a2946341c760ba2b43e01ae7c2f4af 100644
--- a/tools/gn/parser.h
+++ b/tools/gn/parser.h
@@ -58,6 +58,7 @@ class Parser {
std::unique_ptr<ParseNode> ParseExpression(int precedence);
// |PrefixFunc|s used in parsing expressions.
+ std::unique_ptr<ParseNode> Block(Token token);
std::unique_ptr<ParseNode> Literal(Token token);
std::unique_ptr<ParseNode> Name(Token token);
std::unique_ptr<ParseNode> Group(Token token);
@@ -85,7 +86,10 @@ class Parser {
std::unique_ptr<ParseNode> ParseFile();
std::unique_ptr<ParseNode> ParseStatement();
- std::unique_ptr<BlockNode> ParseBlock();
+ // Expects to be passed the token corresponding to the '{' and that the
+ // current token is the one following the '{'.
+ std::unique_ptr<BlockNode> ParseBlock(Token being_brace,
+ BlockNode::ResultMode result_mode);
std::unique_ptr<ParseNode> ParseCondition();
// Generates a pre- and post-order traversal of the tree.
« no previous file with comments | « tools/gn/parse_tree_unittest.cc ('k') | tools/gn/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698