summaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md34
1 files changed, 33 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b60bf8a..1c87ff7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
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.8.2 5## v0.8.5
6 6
7### Fixed Issues 7### Fixed Issues
8 8
@@ -11,6 +11,38 @@ The implementation for the original Moonscript language 0.5.0 can be found in th
11 11
12### Added Features 12### Added Features
13 13
14* Nil coalescing operator.
15```moonscript
16local a, b, c, d
17a = b ?? c ?? d
18func a ?? {}
19
20a ??= false
21```
22Compiles to:
23```lua
24local a, b, c, d
25if b ~= nil then
26 a = b
27else
28 if c ~= nil then
29 a = c
30 else
31 a = d
32 end
33end
34func((function()
35 if a ~= nil then
36 return a
37 else
38 return { }
39 end
40end)())
41if a == nil then
42 a = false
43end
44```
45
14* New metatable syntax. 46* New metatable syntax.
15 ```moonscript 47 ```moonscript
16 #: mt = tb 48 #: mt = tb