Commit 2401a698 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

Merge pull request #24 from elnrnag/master

Simplified solution for Preventing crash in case of deleted file in t…
parents 7e15c5b0 d2089cad
......@@ -174,13 +174,15 @@ public final class CfgAnalyzer {
}
public List<SyntacticErrorStorage> getErrorStorage() {
if (lexerListener != null && !lexerListener.getErrorsStored().isEmpty() && parserListener != null && parserListener.getErrorsStored().isEmpty()) {
return lexerListener.getErrorsStored();
} else if (lexerListener != null && lexerListener.getErrorsStored().isEmpty() && parserListener != null && !parserListener.getErrorsStored().isEmpty()) {
return parserListener.getErrorsStored();
} else if (lexerListener != null && !lexerListener.getErrorsStored().isEmpty() && parserListener != null && !parserListener.getErrorsStored().isEmpty()) {
if (lexerListener.addAll(parserListener.getErrorsStored())) {
if (lexerListener != null && parserListener != null) {
if (!lexerListener.getErrorsStored().isEmpty() && parserListener.getErrorsStored().isEmpty()) {
return lexerListener.getErrorsStored();
} else if (lexerListener.getErrorsStored().isEmpty() && !parserListener.getErrorsStored().isEmpty()) {
return parserListener.getErrorsStored();
} else if (!lexerListener.getErrorsStored().isEmpty() && !parserListener.getErrorsStored().isEmpty()) {
if (lexerListener.addAll(parserListener.getErrorsStored())) {
return lexerListener.getErrorsStored();
}
}
}
return new ArrayList<SyntacticErrorStorage>();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment