diff options
author | Li Jin <dragon-fly@qq.com> | 2020-06-22 16:50:40 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2020-06-22 16:50:40 +0800 |
commit | cd2b60b101a398cb9356d746364e70eaed1860f1 (patch) | |
tree | a1fe71b76faabc4883f16905a94164ce5c23e692 /CHANGELOG.md | |
parent | 88c1052e700f38cf3d8ad82d469da4c487760b7e (diff) | |
download | yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.tar.gz yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.tar.bz2 yuescript-cd2b60b101a398cb9356d746364e70eaed1860f1.zip |
add support for local variable declared with attribute 'close' and 'const' for Lua 5.4.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cf545f5..3fe390d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
@@ -4,19 +4,57 @@ The implementation for original Moonscript language 0.5.0 can be found in the `0 | |||
4 | 4 | ||
5 | 5 | ||
6 | 6 | ||
7 | ## v0.3.11 | 7 | ## v0.4.1 |
8 | |||
9 | ### Added Features | ||
10 | |||
11 | * Add support for local variable declared with attribute 'close' and 'const' for Lua 5.4. | ||
12 | |||
13 | ```moonscript | ||
14 | close a = setmetatable {}, __close: => | ||
15 | const b = if var then 123 else 'abc' | ||
16 | ``` | ||
17 | |||
18 | Compiles to: | ||
19 | |||
20 | ```Lua | ||
21 | local _var_0 = setmetatable({ }, { | ||
22 | __close = function(self) | ||
23 | end | ||
24 | }) | ||
25 | local a <close> = _var_0 | ||
26 | local _var_1 | ||
27 | if var then | ||
28 | _var_1 = 123 | ||
29 | else | ||
30 | _var_1 = 'abc' | ||
31 | end | ||
32 | local b <const> = _var_1 | ||
33 | ``` | ||
34 | |||
35 | |||
36 | |||
37 | ## v0.4.0 | ||
8 | 38 | ||
9 | ### Fixed Issues | 39 | ### Fixed Issues |
10 | 40 | ||
41 | * Fix issues of unary and binary operator "~". | ||
42 | |||
43 | * Fix Moonscript issue 416: ambiguous Lua output in some cases. | ||
44 | |||
11 | * Fix errors when explicitly declaring global or local variable initialized with table block. | 45 | * Fix errors when explicitly declaring global or local variable initialized with table block. |
12 | * Fix macro type mismatch issue. | 46 | * Fix macro type mismatch issue. |
13 | * Fix line break issue in macro, disable macro declaration outside the root scope. | 47 | * Fix line break issue in macro, disable macro declaration outside the root scope. |
14 | * Fix existential operator issue when used in operator-value list. | 48 | * Fix existential operator issue when used in operator-value list. |
15 | * Fix assignment with backcall expr not well handled issue. | 49 | * Fix assignment with backcall expr not well handled issue. |
50 | * Fix destructure case assigning one table variable to an operator-value expression. | ||
51 | * Fix simple chain value with Lua keyword colon chain item. | ||
16 | 52 | ||
53 | ### Added Features | ||
17 | 54 | ||
55 | * Change operator precedence to 1 ^ 2 unary operators (not, #, -, ~) 3 |> 4 *, /, //, %, ... | ||
18 | 56 | ||
19 | ### Added Features | 57 | * Make back call operator use highest priority for operator precedence. |
20 | 58 | ||
21 | * Add existential operator support for `with` statement. | 59 | * Add existential operator support for `with` statement. |
22 | * Add repeat until statement support. | 60 | * Add repeat until statement support. |