$ luarocks install mooncake
MoonCake is Swift like programming language compiles to Lua, you can try it in your browser
https://moocscript.fun
also provide vscode extension with LSP support
you can search and install `moochelper` in VS Code extension market
or you can download and install pre-build .vsix from
- https://github.com/lalawue/MoocHelper/releases
- https://gitee.com/lalawue/MoocHelper/releases
with differences from Lua
- variable default local scope
- support guard keyword
- support switch keyword
- support continue keyword
- support defer keyword in function scope
- support create class / struct
- support extension class / struct
- support import keyword
- support anonymous function form '{ in }' likes in Swift
- support expression in string like print("5 + 3 = \(5 + 3)")
also support project compile output to Lua first, without any outer dependency.