c-compiler/src/typechecker.h
2026-04-13 21:08:57 +03:00

24 lines
498 B
C++

#ifndef TYPECHECK_H
#define TYPECHECK_H
#include <map>
#include "types.h"
#include "binops.h"
#include "casting.h"
#include "errors.h"
namespace typecheck {
struct Scope {
std::map<std::string, std::shared_ptr<types::Type>> symbols;
std::optional<std::shared_ptr<types::Type>> return_ty;
};
struct State {
std::vector<types::BinopDefinition> binops;
std::vector<types::CastDefinition> casts;
std::vector<CompileError> errors;
};
}
#endif