aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/backcall.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2024-03-21 09:14:34 +0800
committerLi Jin <dragon-fly@qq.com>2024-03-21 09:14:34 +0800
commit4a3cc26c6dfd74e61c8b6480038d6a292ea86e47 (patch)
tree9554b94cfc15e4acee0c2e60b63af16f1b828207 /spec/outputs/backcall.lua
parent80b65520da432843f0c63431a1867bd2620bc4ac (diff)
downloadyuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.tar.gz
yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.tar.bz2
yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.zip
remove redundant 'do' blocks in code generation.
Diffstat (limited to 'spec/outputs/backcall.lua')
-rw-r--r--spec/outputs/backcall.lua20
1 files changed, 9 insertions, 11 deletions
diff --git a/spec/outputs/backcall.lua b/spec/outputs/backcall.lua
index b065388..38e5754 100644
--- a/spec/outputs/backcall.lua
+++ b/spec/outputs/backcall.lua
@@ -31,19 +31,17 @@ do
31 end)()) 31 end)())
32end 32end
33do 33do
34 do 34 local _obj_0 = http
35 local _obj_0 = http 35 if _obj_0 ~= nil then
36 if _obj_0 ~= nil then 36 _obj_0.get("ajaxtest", function(data)
37 _obj_0.get("ajaxtest", function(data) 37 body[".result"]:html(data)
38 body[".result"]:html(data) 38 return http.post("ajaxprocess", data, function(processed)
39 return http.post("ajaxprocess", data, function(processed) 39 body[".result"]:append(processed)
40 body[".result"]:append(processed) 40 return setTimeout(1000, function()
41 return setTimeout(1000, function() 41 return print("done")
42 return print("done")
43 end)
44 end) 42 end)
45 end) 43 end)
46 end 44 end)
47 end 45 end
48end 46end
49do 47do