moonscript icon indicating copy to clipboard operation
moonscript copied to clipboard

:crescent_moon: A language that compiles to Lua

Results 118 moonscript issues
Sort by recently updated
recently updated
newest added

Consider the following lua statement: `for l=1,2 do end` How to perfectly translate this into moonscript? We need a statement that does nothing, like `pass` in Python and `nop` in...

When running `moonc` on a directory, with output to a different directory, an unwanted extra folder is created. ``` 15:35:10 ~/workspaces/hlship/rejeweled > tree src src ├── [ 259] conf.lua ├──...

In Lua 5.3, function `load` accepts four arguments, the last one being `env`, which is a table if provided. So in Lua 5.3 you basic do: ``` local i =...

When running from cli tool `moon`, moonscript catches any error generated and rewrite its traceback's line number and the `moonscript_chunk` to `main chunk`. This can be found in [here](https://github.com/leafo/moonscript/blob/master/moonscript/errors.moon#L39), where...

Currently, moonc statement compiler compiles "fndef" node into two separate lines: ```moonscript funcname = -> ``` into ```lua local funcname funcname = function() end ``` Which is not desirable, as...

Discovered because I had accidentally written `!x` instead of `not x`. Some examples: ```moonscript ! !x print if !x ``` All of these cause: ``` Compile error: Failed to find...

> 0.5.0 — September 25 2015 > 0.4.0 — December 6 2015

Built in functions produce very comprehensible error messages for bad argument types ``` Lua math.sin("a string that does not belong") -- Bad argument #1 to function 'sin'. Number expected, got...

I've been looking for an answer to this for a while (working on a GUI lib for Love written in MoonScript) so that I can make a project in MoonScript...

```moon class Vector nonzero: => @x != 0 or @y += 0 some_valid: => code ``` `nonzero` method has syntax issue, line number reported is not useful