mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-06 06:58:45 +00:00
abstract types typecheck, fixes
This commit is contained in:
parent
9aeba7b0de
commit
c433448952
9 changed files with 143 additions and 94 deletions
|
|
@ -55,4 +55,17 @@ inline void HandleRuntimeError(const std::string& message,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
inline void HandleNamesError(const std::string& message,
|
||||
const interpreter::tokens::BaseNode& node) {
|
||||
std::cerr << "\x1b[1;31mNames Error:\x1b[0m " << message << " at ";
|
||||
PrintPosition(std::cerr, node.start_position, node.end_position);
|
||||
std::cerr << ".\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline void DebugPrint(const T& value) {
|
||||
std::cerr << "\x1b[1;33mDebug:\x1b[0m " << value << '\n';
|
||||
}
|
||||
|
||||
} // namespace error_handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue