summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/parse/fwd.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/parse/fwd.hh')
-rw-r--r--tiger-compiler/src/parse/fwd.hh38
1 files changed, 38 insertions, 0 deletions
diff --git a/tiger-compiler/src/parse/fwd.hh b/tiger-compiler/src/parse/fwd.hh
new file mode 100644
index 0000000..19ed898
--- /dev/null
+++ b/tiger-compiler/src/parse/fwd.hh
@@ -0,0 +1,38 @@
+/**
+ ** \file parse/fwd.hh
+ ** \brief Forward declarations for the parse module.
+ */
+
+#pragma once
+
+#include <misc/variant.hh>
+
+// From ast/.
+namespace ast
+{
+ class Exp;
+ class ChunkList;
+
+} // namespace ast
+
+namespace parse
+{
+ // From scantiger.hh.
+ class Lexer;
+
+ // From parsetiger.yy.
+ class parser;
+
+ // From location.hh.
+ class location;
+
+ // From tiger-driver.hh.
+ class TigerDriver;
+
+ // From tweast.hh
+ class Tweast;
+
+ /// Result of a parse: an Exp (*.tig) or a ChunkList (*.tih).
+ using ast_type = misc::variant<ast::Exp*, ast::ChunkList*>;
+
+} // namespace parse