part of execute_visitor, minor fixes, function & operator fixes

This commit is contained in:
ProgramSnail 2023-05-09 14:55:04 +03:00
parent d31979166e
commit 78de51f6f2
6 changed files with 345 additions and 247 deletions

View file

@ -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