aboutsummaryrefslogtreecommitdiff
path: root/CHANGELOG.md
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-11-09 11:30:17 +0800
committerLi Jin <dragon-fly@qq.com>2022-11-09 11:30:17 +0800
commit6db82a69096a48c8b348217b0db6e06b297218ca (patch)
tree58dda2d771e508c417017d649707e8198f481a55 /CHANGELOG.md
parentb041d365b88b76418def86d13a8f946dd8a6db73 (diff)
downloadyuescript-6db82a69096a48c8b348217b0db6e06b297218ca.tar.gz
yuescript-6db82a69096a48c8b348217b0db6e06b297218ca.tar.bz2
yuescript-6db82a69096a48c8b348217b0db6e06b297218ca.zip
refactor and update readme and changelog.
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r--CHANGELOG.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 33c038b..dedd8e7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,57 @@
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.15.12
6
7### Added Features
8
9* yue.to_ast(): Reserve comment nodes followed by a statement in AST structures.
10* Added `while` clause line decorator.
11 ```moonscript
12 reader\parse_line! until reader\eof!
13 ```
14 compiles to:
15 ```lua
16 while not reader:eof() do
17 reader:parse_line()
18 end
19 ```
20* Supported underscores in number literal. `1_000_000`, `0xFF_EF_06`
21* Refactored some error messages with details instead of just "syntax error".
22* Added chaining assignment. `a = b = c = 0`
23
24### Fixed Issues
25
26* Change metable accessing operator to `<>` instead of postfix `#`.
27 ```moonscript
28 <>: mt = tb
29 mt = tb.<>
30 a = <>: mt, value: 1
31 b = :<add>, value: 2
32 close _ = <close>: -> print "out of scope"
33 ```
34 compiles to:
35 ```lua
36 local mt = getmetatable(tb)
37 mt = getmetatable(tb)
38 local a = setmetatable({
39 value = 1
40 }, mt)
41 local b = setmetatable({
42 value = 2
43 }, {
44 __add = add
45 })
46 local _ <close> = setmetatable({ }, {
47 __close = function()
48 return print("out of scope")
49 end
50 })
51 ```
52* Refactor `continue` keyword implementation with goto statement when targeting Lua version 5.2 and higher.
53* Skip utf-8 bom in parser.
54* Fixed classes don't inherits metamethods properly.
55
5## v0.14.5 56## v0.14.5
6 57
7### Added Features 58### Added Features