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

Class SymbolicValueReader

src/jvm/clojure/lang/LispReader.java:751–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749
750
751public static class SymbolicValueReader extends AFn{
752
753 static IPersistentMap specials = PersistentHashMap.create(Symbol.intern("Inf"), Double.POSITIVE_INFINITY,
754 Symbol.intern("-Inf"), Double.NEGATIVE_INFINITY,
755 Symbol.intern("NaN"), Double.NaN);
756
757 public Object invoke(Object reader, Object quote, Object opts, Object pendingForms) {
758 PushbackReader r = (PushbackReader) reader;
759 Object o = read(r, true, null, true, opts, ensurePending(pendingForms));
760
761 if (!(o instanceof Symbol))
762 throw Util.runtimeException("Invalid token: ##" + o);
763 if (!(specials.containsKey(o)))
764 throw Util.runtimeException("Unknown symbolic value: ##" + o);
765
766 return specials.valAt(o);
767 }
768}
769
770public static class WrappingReader extends AFn{
771 final Symbol sym;

Callers

nothing calls this directly

Calls 2

createMethod · 0.95
internMethod · 0.95

Tested by

no test coverage detected