diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-06-04 11:38:34 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-06-04 11:38:34 +0800 |
| commit | 548ab1d9ff5b831050f14f1355a3314a41163ad6 (patch) | |
| tree | d84b6b64b4e547070c7c43db53821b83b819ab8e /spec/outputs/codes_from_doc.lua | |
| parent | 98be64dd52df92f7fdd40bae225c279db1676cab (diff) | |
| download | yuescript-548ab1d9ff5b831050f14f1355a3314a41163ad6.tar.gz yuescript-548ab1d9ff5b831050f14f1355a3314a41163ad6.tar.bz2 yuescript-548ab1d9ff5b831050f14f1355a3314a41163ad6.zip | |
Added new syntax.
- Slice Expression.
- Reversed Indexing,.
- Range Destructuring.
- Table Range Matching.
Diffstat (limited to 'spec/outputs/codes_from_doc.lua')
| -rw-r--r-- | spec/outputs/codes_from_doc.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index cce0516..b8dd9b7 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
| @@ -1063,7 +1063,7 @@ local _accum_0 = { } | |||
| 1063 | local _len_0 = 1 | 1063 | local _len_0 = 1 |
| 1064 | local _list_0 = items | 1064 | local _list_0 = items |
| 1065 | local _max_0 = 5 | 1065 | local _max_0 = 5 |
| 1066 | for _index_0 = 1, _max_0 < 0 and #_list_0 + _max_0 or _max_0 do | 1066 | for _index_0 = 1, _max_0 < 0 and #_list_0 + _max_0 + 1 or _max_0 do |
| 1067 | local item = _list_0[_index_0] | 1067 | local item = _list_0[_index_0] |
| 1068 | _accum_0[_len_0] = item | 1068 | _accum_0[_len_0] = item |
| 1069 | _len_0 = _len_0 + 1 | 1069 | _len_0 = _len_0 + 1 |
| @@ -1100,7 +1100,7 @@ for key, value in pairs(object) do | |||
| 1100 | end | 1100 | end |
| 1101 | local _list_0 = items | 1101 | local _list_0 = items |
| 1102 | local _max_0 = 4 | 1102 | local _max_0 = 4 |
| 1103 | for _index_0 = 2, _max_0 < 0 and #_list_0 + _max_0 or _max_0 do | 1103 | for _index_0 = 2, _max_0 < 0 and #_list_0 + _max_0 + 1 or _max_0 do |
| 1104 | local item = _list_0[_index_0] | 1104 | local item = _list_0[_index_0] |
| 1105 | print(item) | 1105 | print(item) |
| 1106 | end | 1106 | end |
| @@ -3333,7 +3333,7 @@ local _accum_0 = { } | |||
| 3333 | local _len_0 = 1 | 3333 | local _len_0 = 1 |
| 3334 | local _list_0 = items | 3334 | local _list_0 = items |
| 3335 | local _max_0 = 5 | 3335 | local _max_0 = 5 |
| 3336 | for _index_0 = 1, _max_0 < 0 and #_list_0 + _max_0 or _max_0 do | 3336 | for _index_0 = 1, _max_0 < 0 and #_list_0 + _max_0 + 1 or _max_0 do |
| 3337 | local item = _list_0[_index_0] | 3337 | local item = _list_0[_index_0] |
| 3338 | _accum_0[_len_0] = item | 3338 | _accum_0[_len_0] = item |
| 3339 | _len_0 = _len_0 + 1 | 3339 | _len_0 = _len_0 + 1 |
| @@ -3370,7 +3370,7 @@ for key, value in pairs(object) do | |||
| 3370 | end | 3370 | end |
| 3371 | local _list_0 = items | 3371 | local _list_0 = items |
| 3372 | local _max_0 = 4 | 3372 | local _max_0 = 4 |
| 3373 | for _index_0 = 2, _max_0 < 0 and #_list_0 + _max_0 or _max_0 do | 3373 | for _index_0 = 2, _max_0 < 0 and #_list_0 + _max_0 + 1 or _max_0 do |
| 3374 | local item = _list_0[_index_0] | 3374 | local item = _list_0[_index_0] |
| 3375 | print(item) | 3375 | print(item) |
| 3376 | end | 3376 | end |
