Skip to content

Commit

Permalink
[refactor] Address Code Review comments from @dizzzz
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Oct 14, 2023
1 parent 6c561e9 commit 72b7d4e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions exist-core/src/main/antlr/org/exist/xquery/parser/XQuery.g
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ options {
public XQueryParser(XQueryLexer lexer) {
this((TokenStream)lexer);
this.lexer= lexer;
this.lexer = lexer;
setASTNodeClass("org.exist.xquery.parser.XQueryAST");
}
Expand All @@ -95,15 +95,18 @@ options {
}
public String getErrorMessage() {
StringBuilder buf= new StringBuilder();
for (Iterator i= exceptions.iterator(); i.hasNext();) {
StringBuilder buf = new StringBuilder();
for (Iterator i = exceptions.iterator(); i.hasNext();) {
buf.append(((Exception) i.next()).toString());
buf.append('\n');
}
return buf.toString();
}
public Exception getLastException() {
if (!foundError) {
return null;
}
return (Exception) exceptions.get(exceptions.size() - 1);
}
Expand All @@ -112,7 +115,7 @@ options {
}
protected void handleException(Exception e) {
foundError= true;
foundError = true;
exceptions.add(e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
package org.exist.xquery.functions.fn;

import com.ibm.icu.text.Collator;
import org.exist.xquery.*;
import org.exist.xquery.ErrorCodes;
import org.exist.xquery.Function;
import org.exist.xquery.FunctionSignature;
import org.exist.xquery.XPathException;
import org.exist.xquery.XQueryContext;
import org.exist.xquery.value.Item;
import org.exist.xquery.value.Sequence;

Expand Down

0 comments on commit 72b7d4e

Please sign in to comment.