From 98fbd5cf402d84a8b5bce7d31fa81156bcf326ac Mon Sep 17 00:00:00 2001 From: giles Date: Thu, 16 Apr 2026 16:07:52 +0000 Subject: [PATCH] =?UTF-8?q?HS=20parser:=20possessive=20's=20style=20proper?= =?UTF-8?q?ty=20access=20(517=E2=86=92519/831)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit parse-poss-tail now handles style token type after 's operator. #div2's *color, #foo's *width etc. now correctly produce (style prop owner) AST which compiles to dom-set/get-style. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/hyperscript/parser.sx | 1 + shared/static/wasm/sx/hs-parser.sx | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/hyperscript/parser.sx b/lib/hyperscript/parser.sx index eba498cd..6ac177e7 100644 --- a/lib/hyperscript/parser.sx +++ b/lib/hyperscript/parser.sx @@ -63,6 +63,7 @@ (let ((prop (get (adv!) "value"))) (parse-prop-chain (list (quote .) owner prop)))) + ((= typ "style") (do (adv!) (list (quote style) val owner))) (true owner))))) (define parse-prop-chain diff --git a/shared/static/wasm/sx/hs-parser.sx b/shared/static/wasm/sx/hs-parser.sx index eba498cd..6ac177e7 100644 --- a/shared/static/wasm/sx/hs-parser.sx +++ b/shared/static/wasm/sx/hs-parser.sx @@ -63,6 +63,7 @@ (let ((prop (get (adv!) "value"))) (parse-prop-chain (list (quote .) owner prop)))) + ((= typ "style") (do (adv!) (list (quote style) val owner))) (true owner))))) (define parse-prop-chain