Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

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

Open nobodxbodon opened this issue 1 year ago • 1 comments

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

Screenshot 2024-01-07 at 10 53 43 PM

nobodxbodon avatar Jan 08 '24 06:01 nobodxbodon

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

pigpigyyy avatar Jan 08 '24 07:01 pigpigyyy