#ifndef TYPECHECK_H #define TYPECHECK_H #include #include "types.h" #include "errors.h" namespace typecheck { enum class TypecheckResult { /// @brief The types match perfectly (enough) Ok, /// @brief The original type can be implicitly cast into the given type Castable, /// @brief The types are totally incompatible Error, }; struct Scope { std::map> symbols; std::optional> return_ty; }; struct State { std::vector errors; }; } #endif