| 200 | } |
| 201 | |
| 202 | @Override |
| 203 | public Value value(final QueryContext qc) throws QueryException { |
| 204 | final Expr[] ex = exprs; |
| 205 | Value value = Empty.VALUE; |
| 206 | final int el = ex.length; |
| 207 | for(int e = 0; e < el;) { |
| 208 | value = ex[e++].value(qc); |
| 209 | if(value == Empty.VALUE) continue; |
| 210 | while(e < el) { |
| 211 | final Value value2 = ex[e++].value(qc); |
| 212 | if(value2 == Empty.VALUE) continue; |
| 213 | while(e < el) { |
| 214 | final Value value3 = ex[e++].value(qc); |
| 215 | if(value3 == Empty.VALUE) continue; |
| 216 | final long size = size(); |
| 217 | final ValueBuilder vb = new ValueBuilder(qc, size); |
| 218 | if(size == -1) vb.tree(value.size() + value2.size() + value3.size() >= |
| 219 | Array.INITIAL_CAPACITY ? 1 : Array.INITIAL_CAPACITY); |
| 220 | vb.add(value).add(value2).add(value3); |
| 221 | while(e < el) vb.add(ex[e++].value(qc)); |
| 222 | return vb.value(this); |
| 223 | } |
| 224 | return value.append(value2, qc); |
| 225 | } |
| 226 | } |
| 227 | return value; |
| 228 | } |
| 229 | |
| 230 | @Override |
| 231 | public Expr simplifyFor(final Simplify mode, final CompileContext cc) throws QueryException { |