Separate eval from render: render-active? gate in eval-list
eval-list only dispatches to the render adapter when render-active? is true. render-to-html and aser set render-active! on entry. Pure evaluate() calls no longer stringify component results through the render adapter. Fixes component children parity: (defcomp ~wrap (&key &rest children) children) now returns [1,2,3] in eval mode, renders to "123" only in render mode. Parity: 112/116 pass (remaining 4 are hand-written evaluator.py bugs). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -174,8 +174,8 @@
|
||||
(let ((mac (env-get env name)))
|
||||
(make-thunk (expand-macro mac args env) env))
|
||||
|
||||
;; Render expression — delegate to active adapter.
|
||||
(is-render-expr? expr)
|
||||
;; Render expression — delegate to active adapter (only when rendering).
|
||||
(and (render-active?) (is-render-expr? expr))
|
||||
(render-expr expr env)
|
||||
|
||||
;; Fall through to function call
|
||||
|
||||
Reference in New Issue
Block a user