summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md60
1 files changed, 60 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12baa60..d106df0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,66 @@
2 2
3The implementation for the original Moonscript language 0.5.0 can be found in the `0.5.0` branch of Yuescript. The Moonscript with fixes and new features is in the main branch of Yuescript. Here are the changelogs for each Yuescript version. 3The implementation for the original Moonscript language 0.5.0 can be found in the `0.5.0` branch of Yuescript. The Moonscript with fixes and new features is in the main branch of Yuescript. Here are the changelogs for each Yuescript version.
4 4
5## v0.13.4
6
7### Added Features
8
9* Added update syntax support for `var //= 5`.
10* Added metamethod syntax support for class block.
11 ```moonscript
12 class Foo
13 new: (x) => @x = x
14 mul#: (y) => @x * y
15 ["abc"]#: 123
16 :add
17 :add#
18 ```
19* Added support `with` block access with `[key]` syntax.
20 ```moonscript
21 with tb
22 [1] = [2]\func!
23 print [3]
24 with [abc]
25 [4] = 1
26 [] = "abc"
27 ```
28
29* Added table pattern matching syntax.
30 ```moonscript
31 items =
32 * x: 100
33 y: 200
34 * width: 300
35 height: 400
36
37 for item in *items
38 switch item
39 when :x, :y
40 print "Vec2 #{x}, #{y}"
41 when :width, :height
42 print "size #{width}, #{height}"
43 ```
44
45### Fixed Issues
46
47* Fix `import X as {_}` generates invalid Lua code.
48* Fix attribute syntax with line decorator compiles to unexpected codes.
49 ```moonscript
50 const a = 1 if true
51 ```
52 now compiles to:
53 ```lua
54 local a <const> = (function()
55 if true then
56 return 1
57 end
58 end)()
59 ```
60* Fix continue in `repeat` loop gives invalid code.
61* Fix variables with attributes "const" and "close" should both get constant check in compiler.
62* Fix ambiguous syntax starting with `[[`. Expressions starting with `[[` will now be always treated like raw strings other than nested list comprehensions.
63* Fix module can export both macros and normal values. The macro exporting module can now only allow macro definition, macro importing and macro expansion in place for better compiler performance.
64
5## v0.10.17 65## v0.10.17
6 66
7### Added Features 67### Added Features