Commit ddb20bb1 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

Merge pull request #25 from elnrnag/master

Even more Simplified solution for Preventing crash in case of deleted…
parents 2401a698 e1525b7d
......@@ -175,17 +175,11 @@ public final class CfgAnalyzer {
public List<SyntacticErrorStorage> getErrorStorage() {
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();
}
}
lexerListener.addAll(parserListener.getErrorsStored());
return lexerListener.getErrorsStored();
} else {
return new ArrayList<SyntacticErrorStorage>();
}
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