diff options
author | Li Jin <dragon-fly@qq.com> | 2024-03-21 09:14:34 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-03-21 09:14:34 +0800 |
commit | 4a3cc26c6dfd74e61c8b6480038d6a292ea86e47 (patch) | |
tree | 9554b94cfc15e4acee0c2e60b63af16f1b828207 /spec/outputs/backcall.lua | |
parent | 80b65520da432843f0c63431a1867bd2620bc4ac (diff) | |
download | yuescript-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.lua | 20 |
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)()) |
32 | end | 32 | end |
33 | do | 33 | do |
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 |
48 | end | 46 | end |
49 | do | 47 | do |