diff options
Diffstat (limited to '')
| -rw-r--r-- | spec/inputs/syntax.moon | 9 | ||||
| -rw-r--r-- | src/MoonP/moon_compiler.cpp | 2 | ||||
| -rw-r--r-- | src/MoonP/moon_parser.cpp | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/spec/inputs/syntax.moon b/spec/inputs/syntax.moon index 80b762c..9895c44 100644 --- a/spec/inputs/syntax.moon +++ b/spec/inputs/syntax.moon | |||
| @@ -369,5 +369,14 @@ do | |||
| 369 | a = f2! | 369 | a = f2! |
| 370 | - 1 |> f2 | 370 | - 1 |> f2 |
| 371 | 371 | ||
| 372 | _1 | ||
| 373 | ,_2 | ||
| 374 | ,_3 | ||
| 375 | ,_4 = 1 | ||
| 376 | ,f 2 | ||
| 377 | ,3 | ||
| 378 | ,f 4, | ||
| 379 | 4 | ||
| 380 | |||
| 372 | nil | 381 | nil |
| 373 | 382 | ||
diff --git a/src/MoonP/moon_compiler.cpp b/src/MoonP/moon_compiler.cpp index 1652e17..cac4ad0 100644 --- a/src/MoonP/moon_compiler.cpp +++ b/src/MoonP/moon_compiler.cpp | |||
| @@ -49,7 +49,7 @@ inline std::string s(std::string_view sv) { | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | const std::string_view version() { | 51 | const std::string_view version() { |
| 52 | return "0.4.8"sv; | 52 | return "0.4.9"sv; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | // name of table stored in lua registry | 55 | // name of table stored in lua registry |
diff --git a/src/MoonP/moon_parser.cpp b/src/MoonP/moon_parser.cpp index 6fa014f..d30d6b5 100644 --- a/src/MoonP/moon_parser.cpp +++ b/src/MoonP/moon_parser.cpp | |||
| @@ -281,7 +281,7 @@ MoonParser::MoonParser() { | |||
| 281 | CompFor = key("for") >> Space >> Variable >> sym('=') >> Exp >> sym(',') >> White >> Exp >> -for_step_value; | 281 | CompFor = key("for") >> Space >> Variable >> sym('=') >> Exp >> sym(',') >> White >> Exp >> -for_step_value; |
| 282 | CompClause = CompFor | CompForEach | key("when") >> Exp; | 282 | CompClause = CompFor | CompForEach | key("when") >> Exp; |
| 283 | 283 | ||
| 284 | Assign = sym('=') >> Seperator >> (With | If | Switch | TableBlock | Exp >> *((sym(',') | sym(';')) >> White >> Exp)); | 284 | Assign = sym('=') >> Seperator >> (With | If | Switch | TableBlock | Exp >> *(White >> set(",;") >> White >> Exp)); |
| 285 | 285 | ||
| 286 | update_op = | 286 | update_op = |
| 287 | expr("..") | | 287 | expr("..") | |
