Each statement class in separate file

This commit is contained in:
Rafał Grodziński
2025-06-23 11:20:20 +09:00
parent 37289cfad8
commit 50c867d61c
25 changed files with 414 additions and 377 deletions

View File

@@ -0,0 +1,12 @@
#include "Parser/Statement/StatementInvalid.h"
StatementInvalid::StatementInvalid(shared_ptr<Token> token, string message):
Statement(StatementKind::INVALID), token(token), message(message) { }
string StatementInvalid::toString(int indent) {
return "Error for token " + token->toString() + " at " + to_string(token->getLine()) + ":" + to_string(token->getColumn()) + ": " + message + "\n";
}
string StatementInvalid::getMessage() {
return message;
}