MCPcopy Create free account
hub / github.com/BaseXdb/basex / toString

Method toString

basex-core/src/main/java/org/basex/query/func/Closure.java:514–532  ·  view source on GitHub ↗
(final QueryString qs)

Source from the content-addressed store, hash-verified

512 }
513
514 @Override
515 public void toString(final QueryString qs) {
516 if(dontEnter) {
517 qs.token(DOTS);
518 } else {
519 enter(() -> {
520 final boolean inlined = !global.isEmpty();
521 if(inlined) {
522 qs.token("((: closure :) ");
523 global.forEach((k, v) -> qs.token(LET).token(k).token(":=").token(v));
524 qs.token(RETURN);
525 }
526 qs.token(FN).params(params);
527 qs.token(AS).token(declType != null ? declType : Types.ITEM_ZM).brace(expr);
528 if(inlined) qs.token(')');
529 return null;
530 });
531 }
532 }
533}

Callers

nothing calls this directly

Calls 6

enterMethod · 0.95
braceMethod · 0.80
tokenMethod · 0.65
isEmptyMethod · 0.45
forEachMethod · 0.45
paramsMethod · 0.45

Tested by

no test coverage detected