24 lines
498 B
C++
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 |