lua: loadstring wraps transpiled AST in (let () …) to contain local definitions
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-24 20:35:18 +00:00
parent f0a4dfbea8
commit 1d3a93b0ca
4 changed files with 41 additions and 38 deletions

View File

@@ -1484,7 +1484,9 @@
(define
lua-loadstring
(fn (src)
(fn (&rest args) (lua-eval-ast src))))
(let ((compiled (lua-transpile src)))
(fn (&rest args)
(eval-expr (list (make-symbol "let") (list) compiled))))))
(define loadstring lua-loadstring)
(define load lua-loadstring)