diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-01-30 16:06:32 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-01-30 16:06:32 +0800 |
| commit | c62d9eb35a310e7663234526ce4b9fe3519ca7cf (patch) | |
| tree | 56b4b418aadab90989e3e29e29e8ab7e04806e8d /spec | |
| parent | 240b1ec4a49128c00a787e6d0928865995b1d02e (diff) | |
| download | yuescript-c62d9eb35a310e7663234526ce4b9fe3519ca7cf.tar.gz yuescript-c62d9eb35a310e7663234526ce4b9fe3519ca7cf.tar.bz2 yuescript-c62d9eb35a310e7663234526ce4b9fe3519ca7cf.zip | |
Separate MoonParser from MoonCompiler, make moonc compile multiple file in threads.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/inputs/backcall.moon | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/inputs/backcall.moon b/spec/inputs/backcall.moon index 355089a..7702059 100644 --- a/spec/inputs/backcall.moon +++ b/spec/inputs/backcall.moon | |||
| @@ -31,17 +31,19 @@ f = -> | |||
| 31 | 998 |> func0("abc", 233) |> func1 |> func2 | 31 | 998 |> func0("abc", 233) |> func1 |> func2 |
| 32 | 32 | ||
| 33 | do | 33 | do |
| 34 | (data) <- http?.get "ajaxtest" | 34 | (data)<- http?.get "ajaxtest" |
| 35 | body[".result"]\html data | 35 | body[".result"]\html data |
| 36 | (processed) <- http.post "ajaxprocess", data | 36 | (processed)<- http.post "ajaxprocess", data |
| 37 | body[".result"]\append processed | 37 | body[".result"]\append processed |
| 38 | <- setTimeout 1000 | 38 | <- setTimeout 1000 |
| 39 | print "done" | 39 | print "done" |
| 40 | 40 | ||
| 41 | do | 41 | do |
| 42 | <- syncStatus | 42 | <- syncStatus |
| 43 | (err,data="nil") <- loadAsync "file.moon" | 43 | (err,data="nil")<- loadAsync "file.moon" |
| 44 | print err if err | 44 | if err |
| 45 | print err | ||
| 46 | return | ||
| 45 | (codes) <- compileAsync data | 47 | (codes) <- compileAsync data |
| 46 | func = loadstring codes | 48 | func = loadstring codes |
| 47 | func! | 49 | func! |
