summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/assert/type-checker.hh
blob: e15e3938c8ca6641c578b5ebc064a25d696be257 (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
/**
 ** \file assert/type-checker.hh
 ** \brief Declaration of assert::TypeChecker.
 */

#pragma once

#include <ast/assert-visitor.hh>
#include <type/type-checker.hh>

namespace assert {

  class TypeChecker
    : public type::TypeChecker
    , public ast::AssertVisitor
  {
  public:
    using super_type = type::TypeChecker;
    using super_type::operator();

    // Build a TypeChecker
    TypeChecker();

    // Type an AssertExp node. All AssertExp must follow the typing table :
    // cond_ : int | assert cond_ : void
    // \param e Node to visit
    void operator()(ast::AssertExp& e) override;
  };

} // assert