Removes empty expressions. @param cc compilation context
(final CompileContext cc)
| 149 | * @param cc compilation context |
| 150 | */ |
| 151 | protected final void removeEmpty(final CompileContext cc) { |
| 152 | if(!((Checks<Expr>) expr -> expr == Empty.VALUE).any(exprs)) return; |
| 153 | |
| 154 | final ExprList list = new ExprList(exprs.length - 1); |
| 155 | for(final Expr expr : exprs) { |
| 156 | if(expr != Empty.VALUE) list.add(expr); |
| 157 | } |
| 158 | cc.info(QueryText.OPTREMOVE_X_X, Empty.VALUE, (Supplier<?>) this::description); |
| 159 | exprs = list.finish(); |
| 160 | } |
| 161 | |
| 162 | /** |
| 163 | * Returns the first expression that yields an empty sequence. If all expressions return non-empty |