diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-01-19 17:11:31 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-01-19 17:11:31 +0800 |
| commit | ccfe66f87663e10603e453f02894bb82dd23c93b (patch) | |
| tree | 78f90066a182978bd74218440d13bd3a4dd1d269 /spec/outputs/codes_from_doc.lua | |
| parent | 8a01e9c4ec201ad7079f6863c9236851d162b864 (diff) | |
| download | yuescript-ccfe66f87663e10603e453f02894bb82dd23c93b.tar.gz yuescript-ccfe66f87663e10603e453f02894bb82dd23c93b.tar.bz2 yuescript-ccfe66f87663e10603e453f02894bb82dd23c93b.zip | |
Made `;` work as statements separator.
Diffstat (limited to 'spec/outputs/codes_from_doc.lua')
| -rw-r--r-- | spec/outputs/codes_from_doc.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index 1df7cef..3b0724a 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
| @@ -756,6 +756,9 @@ end | |||
| 756 | local first = select(1, ...) | 756 | local first = select(1, ...) |
| 757 | return print(ok, count, first) | 757 | return print(ok, count, first) |
| 758 | end)(fn(true)) | 758 | end)(fn(true)) |
| 759 | local a = 1 | ||
| 760 | local b = 2 | ||
| 761 | print(a + b) | ||
| 759 | Rx.Observable.fromRange(1, 8):filter(function(x) | 762 | Rx.Observable.fromRange(1, 8):filter(function(x) |
| 760 | return x % 2 == 0 | 763 | return x % 2 == 0 |
| 761 | end):concat(Rx.Observable.of('who do we appreciate')):map(function(value) | 764 | end):concat(Rx.Observable.of('who do we appreciate')):map(function(value) |
| @@ -3283,6 +3286,9 @@ end | |||
| 3283 | local first = select(1, ...) | 3286 | local first = select(1, ...) |
| 3284 | return print(ok, count, first) | 3287 | return print(ok, count, first) |
| 3285 | end)(fn(true)) | 3288 | end)(fn(true)) |
| 3289 | local a = 1 | ||
| 3290 | local b = 2 | ||
| 3291 | print(a + b) | ||
| 3286 | Rx.Observable.fromRange(1, 8):filter(function(x) | 3292 | Rx.Observable.fromRange(1, 8):filter(function(x) |
| 3287 | return x % 2 == 0 | 3293 | return x % 2 == 0 |
| 3288 | end):concat(Rx.Observable.of('who do we appreciate')):map(function(value) | 3294 | end):concat(Rx.Observable.of('who do we appreciate')):map(function(value) |
