pigpigyyy / Yuescript

A Moonscript dialect compiles to Lua.
http://yuescript.org
MIT License
443 stars 38 forks source link

中文标识符转为unicode是为了使代码兼容老lua版本吗? #161

Open nobodxbodon opened 8 months ago

nobodxbodon commented 8 months ago

知乎上听说新版lua里有个开关支持unicode命名了。

Screenshot 2024-01-07 at 10 53 43 PM
pigpigyyy commented 8 months ago

是为了在不patch Lua源码的环境下能运行Yuescript写的带unicode标识符的代码,毕竟不是所有Lua的运行环境都能patch到源码。也是借鉴一个叫Fennel转译到Lua的语言编译器的处理方式来的。