summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/ast/ty.hh
blob: 847713bace64c20eb3d43b981ef617e0600a9f64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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>