parser error handling

This commit is contained in:
IlyaShurupov 2024-03-06 17:31:17 +03:00 committed by Ilusha
parent fdb861b299
commit 49c67eb028
10 changed files with 119 additions and 72 deletions

View file

@ -17,4 +17,18 @@ TEST_DEF_STATIC(Basic) {
delete res.scope;
}
TEST_DEF(Parser) { testBasic(); }
TEST_DEF_STATIC(ErrorHandling) {
Parser parser;
String stream = "var i = true; print (i + 1) * 10; invalidCharacter ";
auto res = parser.parse(stream);
TEST(res.isError);
delete res.scope;
}
TEST_DEF(Parser) {
testBasic();
testErrorHandling();
}