4 #include "ast/AstNode.h"
5 #include "ast/DeclContext.h"
6 #include "diagnostics/Diagnostics.h"
7 #include "semantic/ExprTypeResolver.h"
8 #include "utils/BumpAllocator.h"
15 ExprTypeResolver& exprTypeResolver)
16 : alloc{alloc}, diag{diag}, exprTypeResolver{exprTypeResolver} {}
18 void ValidateLU(
const ast::LinkingUnit& LU);
21 void validateCU(
const ast::CompilationUnit& CU);
22 void validateMethod(
const ast::MethodDecl& method);
23 void validateStmt(
const ast::Stmt& stmt);
24 void validateReturnStmt(
const ast::ReturnStmt& stmt);
25 void valdiateTypedDecl(
const ast::TypedDecl& decl);
28 ast::Type
const* getTypeFromExpr(ast::Expr
const* expr)
const;
31 ast::MethodDecl
const* currentMethod;
32 ast::CompilationUnit
const* cu_;
35 ExprTypeResolver& exprTypeResolver;