Removed StringBuilder
This commit is contained in:
parent
09d21e835b
commit
ae54062b0a
|
@ -119,19 +119,23 @@ public class QueryParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func consumeSubQuery() -> String {
|
private func consumeSubQuery() -> String {
|
||||||
let sq: StringBuilder = StringBuilder()
|
var sq = ""
|
||||||
while (!tq.isEmpty()) {
|
while (!tq.isEmpty()) {
|
||||||
if (tq.matches("(")) {
|
if (tq.matches("(")) {
|
||||||
sq.append("(").append(tq.chompBalanced("(", ")")).append(")")
|
sq.append("(")
|
||||||
|
sq.append(tq.chompBalanced("(", ")"))
|
||||||
|
sq.append(")")
|
||||||
} else if (tq.matches("[")) {
|
} else if (tq.matches("[")) {
|
||||||
sq.append("[").append(tq.chompBalanced("[", "]")).append("]")
|
sq.append("[")
|
||||||
|
sq.append(tq.chompBalanced("[", "]"))
|
||||||
|
sq.append("]")
|
||||||
} else if (tq.matchesAny(QueryParser.combinators)) {
|
} else if (tq.matchesAny(QueryParser.combinators)) {
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
sq.append(tq.consume())
|
sq.append(tq.consume())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sq.toString()
|
return sq
|
||||||
}
|
}
|
||||||
|
|
||||||
private func findElements()throws {
|
private func findElements()throws {
|
||||||
|
|
Loading…
Reference in New Issue