gn: Swap the order of two declarations. Backports https://chromium-review.googlesource.com/c/chromium/src/+/1098515 which was made to src.git/tools/gn after forking to gn.googlesource.com. Change-Id: Ie7488b31d824ab1caa631c955373842eb2c16b3a Reviewed-on: https://gn-review.googlesource.com/1840 Reviewed-by: Brett Wilson <brettw@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
diff --git a/tools/gn/parser.h b/tools/gn/parser.h index 69dc8cf..c1930b9 100644 --- a/tools/gn/parser.h +++ b/tools/gn/parser.h
@@ -16,18 +16,9 @@ #include "tools/gn/err.h" #include "tools/gn/parse_tree.h" -class Parser; -typedef std::unique_ptr<ParseNode> (Parser::*PrefixFunc)(const Token& token); -typedef std::unique_ptr<ParseNode> ( - Parser::*InfixFunc)(std::unique_ptr<ParseNode> left, const Token& token); - extern const char kGrammar_Help[]; -struct ParserHelper { - PrefixFunc prefix; - InfixFunc infix; - int precedence; -}; +struct ParserHelper; // Parses a series of tokens. The resulting AST will refer to the tokens passed // to the input, so the tokens an the file data they refer to must outlive your @@ -146,4 +137,14 @@ DISALLOW_COPY_AND_ASSIGN(Parser); }; +typedef std::unique_ptr<ParseNode> (Parser::*PrefixFunc)(const Token& token); +typedef std::unique_ptr<ParseNode> ( + Parser::*InfixFunc)(std::unique_ptr<ParseNode> left, const Token& token); + +struct ParserHelper { + PrefixFunc prefix; + InfixFunc infix; + int precedence; +}; + #endif // TOOLS_GN_PARSER_H_