|
GSC Interpreter
A Turing-complete interpreter developed for a compiler course
|
Go to the source code of this file.
Functions | |
| void | report (const int &line, const std::string &where, const std::string &message) |
| Report an error in the given line and location. | |
| void | error (const int &line, const std::string &message) |
| Report an error in the given line. | |
| void | error (const Token &token, const std::string &message) |
| Report an error in the given token. | |
| void | runtimeError (const RuntimeError &error) |
| Report a runtime error given a RuntimeError object. | |
| void error | ( | const int & | line, |
| const std::string & | message | ||
| ) |
Report an error in the given line.
| line | The line number where the error occurred. |
| message | The error message to display. |
hadError to true and writes in stderr. Definition at line 12 of file error.cpp.
| void error | ( | const Token & | token, |
| const std::string & | message | ||
| ) |
| void report | ( | const int & | line, |
| const std::string & | where, | ||
| const std::string & | message | ||
| ) |
Report an error in the given line and location.
| line | The line number where the error occurred. |
| where | The location of the error. |
| message | The error message to display. |
hadError to true and writes in stderr. Definition at line 4 of file error.cpp.
| void runtimeError | ( | const RuntimeError & | error | ) |
Report a runtime error given a RuntimeError object.
| error | The RuntimeError object containing the error details. |
hadRuntimeError to true and writes in stderr. Definition at line 24 of file error.cpp.