MCPcopy Index your code
hub / github.com/clojure/clojure / invoke

Method invoke

src/jvm/clojure/lang/LispReader.java:1629–1667  ·  view source on GitHub ↗
(Object reader, Object mode, Object opts, Object pendingForms)

Source from the content-addressed store, hash-verified

1627 }
1628
1629 public Object invoke(Object reader, Object mode, Object opts, Object pendingForms) {
1630 checkConditionalAllowed(opts);
1631
1632 PushbackReader r = (PushbackReader) reader;
1633 int ch = read1(r);
1634 if (ch == -1)
1635 throw Util.runtimeException("EOF while reading character");
1636
1637 boolean splicing = false;
1638
1639 if (ch == '@') {
1640 splicing = true;
1641 ch = read1(r);
1642 }
1643
1644 while(isWhitespace(ch))
1645 ch = read1(r);
1646
1647 if (ch == -1)
1648 throw Util.runtimeException("EOF while reading character");
1649
1650 if(ch != '(')
1651 throw Util.runtimeException("read-cond body must be a list");
1652
1653 try {
1654 Var.pushThreadBindings(RT.map(READ_COND_ENV, RT.T));
1655
1656 if (isPreserveReadCond(opts)) {
1657 IFn listReader = getMacro(ch); // should always be a list
1658 Object form = listReader.invoke(r, ch, opts, ensurePending(pendingForms));
1659
1660 return ReaderConditional.create(form, splicing);
1661 } else {
1662 return readCondDelimited(r, splicing, opts, pendingForms);
1663 }
1664 } finally {
1665 Var.popThreadBindings();
1666 }
1667 }
1668}
1669
1670/*

Callers

nothing calls this directly

Calls 13

runtimeExceptionMethod · 0.95
pushThreadBindingsMethod · 0.95
mapMethod · 0.95
invokeMethod · 0.95
createMethod · 0.95
readCondDelimitedMethod · 0.95
popThreadBindingsMethod · 0.95
isPreserveReadCondMethod · 0.80
ensurePendingMethod · 0.80
read1Method · 0.45
isWhitespaceMethod · 0.45

Tested by

no test coverage detected