(final CompileContext cc)
| 106 | } |
| 107 | |
| 108 | @Override |
| 109 | public Expr optimize(final CompileContext cc) throws QueryException { |
| 110 | expr = expr.simplifyFor(Simplify.NUMBER, cc); |
| 111 | |
| 112 | final SeqType st = expr.seqType(); |
| 113 | single = st.zeroOrOne() && !st.mayBeWrapped(); |
| 114 | |
| 115 | // position() = 1 to 2 → pos: 1, 2 |
| 116 | if(Function.POSITION.is(expr)) return cc.replaceWith(this, IntPos.get(min, max, info)); |
| 117 | |
| 118 | return expr instanceof Value ? cc.preEval(this) : this; |
| 119 | } |
| 120 | |
| 121 | @Override |
| 122 | public Bln item(final QueryContext qc, final InputInfo ii) throws QueryException { |
no test coverage detected