HS: fix null→nil in generator + asyncCheck fixture (+2 tests)
js_expr_to_sx bare-identifier path returned JS "null"/"undefined" as literal symbols; added keyword mapping before the identifier regex. Registered asyncCheck() global (returns true) for async-when test. Regen'd spec file to propagate the null fix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1881,6 +1881,14 @@ def js_expr_to_sx(expr):
|
||||
if m:
|
||||
return f'(host-get {m.group(1)} "{m.group(2)}")'
|
||||
|
||||
# JS keywords / literals
|
||||
if expr in ('null', 'undefined'):
|
||||
return 'nil'
|
||||
if expr == 'true':
|
||||
return 'true'
|
||||
if expr == 'false':
|
||||
return 'false'
|
||||
|
||||
# Bare identifier
|
||||
if re.match(r'^[A-Za-z_]\w*$', expr):
|
||||
return expr
|
||||
|
||||
Reference in New Issue
Block a user