pattern: Fixed many code inconsistencies and bugs

This commit is contained in:
WerWolv
2022-01-31 14:37:12 +01:00
parent 8f8f3c5415
commit 61fc479c79
22 changed files with 303 additions and 246 deletions

View File

@@ -8,9 +8,6 @@
namespace hex::pl {
Preprocessor::Preprocessor() {
}
std::optional<std::string> Preprocessor::preprocess(const std::string &code, bool initialRun) {
u32 offset = 0;
u32 lineNumber = 1;
@@ -220,8 +217,9 @@ namespace hex::pl {
throwPreprocessorError(hex::format("no #pragma handler registered for type {0}", type.c_str()), pragmaLine);
}
}
} catch (PreprocessorError &e) {
} catch (PatternLanguageError &e) {
this->m_error = e;
return std::nullopt;
}