Yogthos
|
df1e836cda
|
Phase 13: Protocol Completion — reify dispatch, #() reader, IFn protocol
- reader.janet: rewrite read-anon-fn to handle % arg references
% → gensym, %1/%2 → sorted gensyms, replaces all matching % refs
- evaluator.janet: IFn protocol support in default invocation arm
Before erroring "Cannot call X as a function", checks for:
1) type-registry IFn/-invoke method (extend-type protocols)
2) :jolt/protocol-methods :-invoke (reified objects)
- test/phase13-test.janet: 4 test sections (28-31)
28: reify dispatch — protocol methods on reified objects
29: #() anon-fn — % and %1/%2 arg handling
30: extend-type — protocol method dispatch for deftypes
31: clojure.walk loading — keywordize-keys loads correctly
- All pass: 316 ok, 1 fail (pre-existing, unchanged)
|
2026-06-03 13:19:56 -04:00 |
|