stop program when there are errors in parser

This commit is contained in:
Boolean-true 2024-07-03 22:12:19 +02:00
parent 67c3575cf6
commit a77fa439a7

View File

@ -45,6 +45,9 @@ public class Compiler {
for (String error : errorListener.getErrors()) {
LOGGER.severe(error);
}
if (!errorListener.getErrors().isEmpty()) {
throw new RuntimeException("Errors during parsing");
}
return new Program(classes);
}