Windows binary: https://github.com/leafo/moonscript/releases/tag/win32-v0.5.0
Syntax updates
Function calls
Function calls with parentheses can now have free whitespace around the
arguments. Additionally, a line break may be used in place of a comma:
my_func(
"first arg"
=>
print "some func"
"third arg", "fourth arg"
)Function argument definitions
Just like the function all update, function argument definitions have no
whitespace restrictions between arguments, and line breaks can be used to
separate arguments:
some_func = (
name
type
action="print"
) =>
print name, type, actionAdditions
elseifcan be used part of anunlessblock (nymphium)unlessconditional expression can contain an assignment like anifstatement (#251)- Lua 5.3 bitwise operator support (nymphium) (Kawahara Satoru)
- Makefile is Lua version agnostic (nymphium)
- Lint flag can be used with
mooncwatch mode (ChickenNuggers) - Lint exits with status 1 if there was a problem detected (ChickenNuggers)
- Compiler can be used with lulpeg
Bug Fixes
- Slice boundaries can be full expressions (#233)
- Destructure works when used as loop variable in comprehension (#236)
- Proper name local hoisting works for classes again (#287)
- Quoted table key literals can now be parsed when table declaration is in single line (#286)
- Fix an issue where
elsecould get attached to wrongifstatement (#276) - Loop variables will no longer overwrite variables of the same name in the same scope (egonSchiele)
- A file being deleted will not crash polling watch mode (ChickenNuggers)
- The compiler will not try to compile a directory ending in
.moon(Gskartwii) - alt_getopt import works with modern version (Jon Allen)
- Code coverage not being able to find file from chunk name