aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-01-30 16:06:32 +0800
committerLi Jin <dragon-fly@qq.com>2020-01-30 16:06:32 +0800
commitc62d9eb35a310e7663234526ce4b9fe3519ca7cf (patch)
tree56b4b418aadab90989e3e29e29e8ab7e04806e8d /spec
parent240b1ec4a49128c00a787e6d0928865995b1d02e (diff)
downloadyuescript-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.moon10
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 = ->
31998 |> func0("abc", 233) |> func1 |> func2 31998 |> func0("abc", 233) |> func1 |> func2
32 32
33do 33do
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
41do 41do
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!