mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-07 15:38:47 +00:00
part of execute_visitor, minor fixes, function & operator fixes
This commit is contained in:
parent
d31979166e
commit
78de51f6f2
6 changed files with 345 additions and 247 deletions
|
|
@ -42,6 +42,14 @@ inline void HandleTypecheckError(const std::string& message,
|
|||
exit(1);
|
||||
}
|
||||
|
||||
inline void HandleRuntimeError(const std::string& message,
|
||||
const interpreter::tokens::BaseNode& node) { // TODO: place in code
|
||||
std::cout << "Runtime Error: " << message << " at ";
|
||||
PrintPosition(std::cout, node.start_position, node.end_position);
|
||||
std::cout << ".\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
} // namespace error_handling
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue