HS: fix CSS query template tokenization — <${...}/> treated as selector
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 40s
Add '$' to the set of characters that trigger selector tokenization after
'<'. Previously only letters, '.', '#', '[', '*', ':' were recognized.
Now <${"expr"}/> is emitted as a single selector token instead of being
split into op/<brace-open/string/brace-close/op/op tokens that caused the
parser to spiral through comparison-expression parsing (>30s timeout).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -538,7 +538,8 @@
|
||||
(= (hs-peek 1) "#")
|
||||
(= (hs-peek 1) "[")
|
||||
(= (hs-peek 1) "*")
|
||||
(= (hs-peek 1) ":")))
|
||||
(= (hs-peek 1) ":")
|
||||
(= (hs-peek 1) "$")))
|
||||
(do (hs-emit! "selector" (read-selector) start) (scan!))
|
||||
(and (= ch ".") (< (+ pos 1) src-len) (= (hs-peek 1) "."))
|
||||
(do (hs-emit! "op" ".." start) (hs-advance! 2) (scan!))
|
||||
|
||||
Reference in New Issue
Block a user