|
|
3336c4e957
|
Step 18 (part 1): _hyperscript tokenizer — 38 tests
lib/hyperscript/tokenizer.sx — tokenizes real _hyperscript syntax into
typed token stream. Handles:
Keywords (on, set, add, toggle, if, then, from, etc.)
DOM literals (.class, #id, @attr, *style, :local, <sel/>)
Strings (single/double quoted, escapes), template literals
Numbers (integers, decimals, time units: 100ms, 2s)
Operators (==, !=, +, -, 's possessive)
Punctuation (parens, brackets, braces, commas, dots)
Line comments (// to EOL)
Parser will disambiguate .name as class vs property access from context.
Possessive 's correctly distinguished from single-quote strings.
2952/2952 tests, zero failures.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-05 21:49:13 +00:00 |
|