Пример #1
0
 @Override
 Expr opt(final QueryContext ctx, final VarScope scp) throws QueryException {
   if (sig == Function._UNIT_TEST_URIS || sig == Function._UNIT_TEST && expr.length == 0) {
     for (final StaticFunc fn : ctx.funcs.funcs()) {
       if (fn.compiled()) continue;
       final Ann ann = fn.ann;
       for (int i = ann.size(); --i >= 0; ) {
         if (Token.eq(ann.names[i].uri(), QueryText.UNITURI)) {
           fn.compile(ctx);
           break;
         }
       }
     }
   }
   return super.opt(ctx, scp);
 }