gn: Swap the order of two declarations.

This allows compilers targeting the MS ABI to select the correct
inheritance model for the member function pointer types PrefixFunc
and InfixFunc using the complete type of Parser. It will allow us to
enable the new Clang flag -fcomplete-member-pointers globally.

Bug: 847724
Change-Id: I5b3488ce0b64b3ac4884bc499cd355e1651d12b3
Reviewed-on: https://chromium-review.googlesource.com/1098515
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#566964}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3105b4b4381a42d4b426e46a0ccd901582b0f921
diff --git a/parser.h b/parser.h
index 69dc8cf..c1930b9 100644
--- a/parser.h
+++ b/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_