moonscript
moonscript copied to clipboard
:crescent_moon: A language that compiles to Lua
Currently `import` doesn't allow you to modify the names of imports, which means you can't use `import` if there is a risk for name clashes. With the Lua standard libs...
I think this can be desired feature for many users to generate both `--` and `--[[ ... ]]` comments in Lua code.
Desperately waiting for line continuation character... So that ``` some_self_descriptive_variable = if something.long == something_else.even_more_long and here.we_have_another_long[variable] 1 else 2 ``` would become ``` some_self_descriptive_variable = \\ if something.long ==...
It seems like the process for this was different back in 2016 (when 0.5.0 came out) and today. Is there any way to build a (single) static executable for Moonscript...
``` ryan@buttstallion ~ 19:09:41 % moon test.moon /usr/bin/lua5.1: ...e/ryan/.luarocks/share/lua/5.1/moonscript/errors.lua:81: attempt to call method 'match' (a nil value) stack traceback: ...e/ryan/.luarocks/share/lua/5.1/moonscript/errors.lua:81: in function 'rewrite_single' ...e/ryan/.luarocks/share/lua/5.1/moonscript/errors.lua:98: in function 'rewrite_traceback' ...rocks/lib/luarocks/rocks/moonscript/0.5.0-1/bin/moon:105: in function...
I've tried to compile this example taken from [here](https://leafo.net/guides/moonscript-classes.html#class-tips-and-tricks/adding-a-new-method-to-a-class-after-declaration) ``` class Player new: (@name) => for dir in *{"north", "west", "east", "south"} @__base["go_#{dir}"]: => print "#{@name} is going #{dir}" Player("Lee")\go_east!...
Currently, the `import` statement works really well for bringing in stuff into local scope, but an issue arises if two things you want to import have the same name: ```moon...
Hi, Tried installing moonscript earlier on and here is what i keep getting $ luarocks install moonscript Error: not enough memory Thanks
This patches #384 and adds support for lua keywords with @ and @@ accessors.
``` a, {:b} = hello! ``` ``` {:b}, a = hello! ``` ``` a, {:b, :c} = hello! ``` ``` {:b, :c}, a = hello! ```