summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/ty.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/ast/ty.hh')
-rw-r--r--tiger-compiler/src/ast/ty.hh39
1 files changed, 39 insertions, 0 deletions
diff --git a/tiger-compiler/src/ast/ty.hh b/tiger-compiler/src/ast/ty.hh
new file mode 100644
index 0000000..847713b
--- /dev/null
+++ b/tiger-compiler/src/ast/ty.hh
@@ -0,0 +1,39 @@
+/**
+ ** \file ast/ty.hh
+ ** \brief Declaration of ast::Ty.
+ */
+
+#pragma once
+
+#include <ast/ast.hh>
+#include <ast/typable.hh>
+#include <ast/type-constructor.hh>
+
+namespace ast
+{
+ /// Ty.
+ class Ty
+ : public Ast
+ , public Typable
+ , public TypeConstructor
+ {
+ public:
+ /** \name Ctor & dtor.
+ ** \{ */
+ /// Construct a Ty node.
+ explicit Ty(const Location& location);
+ Ty(const Ty&) = delete;
+ Ty& operator=(const Ty&) = delete;
+ /// Destroy a Ty node.
+ /** \} */
+
+ /// \name Visitors entry point.
+ /// \{ */
+ /// Accept a const visitor \a v.
+ void accept(ConstVisitor& v) const override = 0;
+ /// Accept a non-const visitor \a v.
+ void accept(Visitor& v) override = 0;
+ /// \}
+ };
+} // namespace ast
+#include <ast/ty.hxx>