mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-27 08:18:03 +00:00
stop program when there are errors in parser
This commit is contained in:
parent
67c3575cf6
commit
a77fa439a7
@ -45,6 +45,9 @@ public class Compiler {
|
|||||||
for (String error : errorListener.getErrors()) {
|
for (String error : errorListener.getErrors()) {
|
||||||
LOGGER.severe(error);
|
LOGGER.severe(error);
|
||||||
}
|
}
|
||||||
|
if (!errorListener.getErrors().isEmpty()) {
|
||||||
|
throw new RuntimeException("Errors during parsing");
|
||||||
|
}
|
||||||
return new Program(classes);
|
return new Program(classes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user