moonscript
moonscript copied to clipboard
:crescent_moon: A language that compiles to Lua
When building large numbes of files, I wanted to redirect the output to /dev/null, and I discovered it was actually being printed to stderr, not stdout. Is there any reason...
The following table: ```moonscript getters: { pos: => hsEntPos(@ent) talkColor: => do hsEntTalkColor(@ent) or rgb(1, 0, 1) } ``` results in the following lua: ```lua getters = { pos =...
See here: https://github.com/tarantool/tarantool/issues/3143 Tarantool uses [this version](https://github.com/tarantool/luajit/tree/b8587fafa36b417194b208d747e1f2be1faf19be) of LuaJIT. Let me know if you can help. :)
When I specify absolute paths for the output directory and for files to compile, moonc replies with "Invalid argument", while the equivalent relative paths work. Example command: `moonc -t C:\Example\Path\lua...
This should make it faster (it now stops scanning when it hits the desired upvalue) and more correct. It now allows setting an upvalue to a falsey or nil value,...
Nowhere in the official reference mentions this: ``` class sth test:(@arg1)=> with sth \test 9 print(.arg1) ``` moonscript v0.5.0
Embedding?
I'm using Lua for a Go-based project with a Go-based interpreter (so pure Lua only) and I found out about Moonscript.... I would love to use this syntax for my...
```moonscript load = (name) -> with io.open(name) while txt = \read print txt ``` (i meant that you should really make `with` statement interact with given object. This will not...
```moonscript {a,b,_} = {1,2,3} 1 2 ``` compiles to ```lua local a, b, _ do local _obj_0 = { 1, 2, 3 } a, b, _ = _obj_0[1], _obj_0[2], _obj_0[3]...
The following is possible in lua, but causes a parse error in MoonScript. It could be handy, as I use the pattern in lua frequently. ``` a = b =...