Merge branch 'worktree-cssx-components' into macros
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 14m0s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 14m0s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -214,11 +214,6 @@ class PyEmitter:
|
||||
"ho-every": "ho_every",
|
||||
"ho-for-each": "ho_for_each",
|
||||
"sf-defstyle": "sf_defstyle",
|
||||
"sf-defkeyframes": "sf_defkeyframes",
|
||||
"build-keyframes": "build_keyframes",
|
||||
"style-value?": "is_style_value",
|
||||
"style-value-class": "style_value_class",
|
||||
"kf-name": "kf_name",
|
||||
"special-form?": "is_special_form",
|
||||
"ho-form?": "is_ho_form",
|
||||
"strip-prefix": "strip_prefix",
|
||||
@@ -1097,7 +1092,7 @@ from typing import Any
|
||||
# =========================================================================
|
||||
|
||||
from shared.sx.types import (
|
||||
NIL, Symbol, Keyword, Lambda, Component, Continuation, Macro, StyleValue,
|
||||
NIL, Symbol, Keyword, Lambda, Component, Continuation, Macro,
|
||||
HandlerDef, QueryDef, ActionDef, PageDef, _ShiftSignal,
|
||||
)
|
||||
from shared.sx.parser import SxExpr
|
||||
@@ -1206,8 +1201,6 @@ def type_of(x):
|
||||
return "macro"
|
||||
if isinstance(x, _RawHTML):
|
||||
return "raw-html"
|
||||
if isinstance(x, StyleValue):
|
||||
return "style-value"
|
||||
if isinstance(x, Continuation):
|
||||
return "continuation"
|
||||
if isinstance(x, list):
|
||||
@@ -1376,14 +1369,6 @@ def is_macro(x):
|
||||
return isinstance(x, Macro)
|
||||
|
||||
|
||||
def is_style_value(x):
|
||||
return isinstance(x, StyleValue)
|
||||
|
||||
|
||||
def style_value_class(x):
|
||||
return x.class_name
|
||||
|
||||
|
||||
def env_has(env, name):
|
||||
return name in env
|
||||
|
||||
@@ -1534,8 +1519,6 @@ def serialize(val):
|
||||
if t == "raw-html":
|
||||
escaped = escape_string(raw_html_content(val))
|
||||
return '(raw! "' + escaped + '")'
|
||||
if t == "style-value":
|
||||
return '"' + style_value_class(val) + '"'
|
||||
if t == "list":
|
||||
if not val:
|
||||
return "()"
|
||||
@@ -1555,7 +1538,7 @@ def serialize(val):
|
||||
_SPECIAL_FORM_NAMES = frozenset([
|
||||
"if", "when", "cond", "case", "and", "or",
|
||||
"let", "let*", "lambda", "fn",
|
||||
"define", "defcomp", "defmacro", "defstyle", "defkeyframes",
|
||||
"define", "defcomp", "defmacro", "defstyle",
|
||||
"defhandler", "defpage", "defquery", "defaction", "defrelation",
|
||||
"begin", "do", "quote", "quasiquote",
|
||||
"->", "set!",
|
||||
@@ -1717,7 +1700,7 @@ def aser_special(name, expr, env):
|
||||
fn(item)
|
||||
return results if results else NIL
|
||||
# Definition forms — evaluate for side effects
|
||||
if name in ("define", "defcomp", "defmacro", "defstyle", "defkeyframes",
|
||||
if name in ("define", "defcomp", "defmacro", "defstyle",
|
||||
"defhandler", "defpage", "defquery", "defaction", "defrelation"):
|
||||
trampoline(eval_expr(expr, env))
|
||||
return NIL
|
||||
|
||||
Reference in New Issue
Block a user