1 #ifndef VISITORS_TYPE_CHECKER_VISITOR_HH
2 # define VISITORS_TYPE_CHECKER_VISITOR_HH
7 # include <ozulis/visitors/visitor.hh>
13 /// @defgroup Visitors
15 * @brief Check that all expressions are correct (type)
18 class TypeChecker
: public Visitor
<TypeChecker
>
22 virtual ~TypeChecker();
24 inline void setScope(ast::Scope
* scope
);
27 void check(T
*& node
);
29 static void initBase();
31 static void homogenizeTypes(ast::BinaryExp
& node
);
32 void pointerArith(ast::Exp
* pointer
, ast::Exp
* offset
);
34 ast::Function
* currentFunction
;
36 ast::Node
* replacement
;
41 # include "type-checker.hxx"
43 #endif /* !VISITORS_TYPE_CHECKER_VISITOR_HH */