Add TCO to evaluator, update SX docs messaging
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m3s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 3m3s
Evaluator: add _Thunk + _trampoline for tail-call optimization in lambdas, components, if/when/cond/case/let/begin. All callers in html.py, resolver.py, handlers.py, pages.py, jinja_bridge.py, and query_registry.py unwrap thunks at non-tail positions. SX docs: update tagline to "s-expressions for the web", rewrite intro to reflect that SX replaces most JavaScript need, fix "What sx is not" to acknowledge macros and TCO exist. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -169,7 +169,8 @@ def register_components(sx_source: str) -> None:
|
||||
(div :class "..." (div :class "..." title)))))
|
||||
''')
|
||||
"""
|
||||
from .evaluator import _eval
|
||||
from .evaluator import _eval as _raw_eval, _trampoline
|
||||
_eval = lambda expr, env: _trampoline(_raw_eval(expr, env))
|
||||
from .parser import parse_all
|
||||
from .css_registry import scan_classes_from_sx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user