aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/backcall.lua
blob: cb8b2b727429d6385a0548b884944d2f610c08ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
do
	map({
		1,
		2,
		3
	}, function(x)
		return x * 2
	end)
end
do
	map(function(x)
		return x * 2
	end, {
		1,
		2,
		3
	})
end
do
	filter(function(x)
		return x > 2
	end, (function()
		return map(function(x)
			return x * 2
		end, {
			1,
			2,
			3,
			4
		})
	end)())
end
do
	local _obj_0 = http
	if _obj_0 ~= nil then
		_obj_0.get("ajaxtest", function(data)
			body[".result"]:html(data)
			return http.post("ajaxprocess", data, function(processed)
				body[".result"]:append(processed)
				return setTimeout(1000, function()
					return print("done")
				end)
			end)
		end)
	end
end
do
	syncStatus(function()
		return loadAsync("file.yue", function(err, data)
			if data == nil then
				data = "nil"
			end
			if err then
				print(err)
				return
			end
			return compileAsync(data, function(codes)
				local func = loadstring(codes)
				return func()
			end)
		end)
	end)
end
do
	f1(function()
		return f2(function()
			do
				f3(function()
					return f4(function() end)
				end)
			end
			return f5(function()
				return f6(function()
					return f7()
				end)
			end)
		end)
	end)
end
do
	local result, msg
	do
		local _obj_0 = receiveAsync("filename.txt", function(data)
			print(data)
			return processAsync(data, function(info)
				return check(info)
			end)
		end)
		result, msg = _obj_0.result, _obj_0.msg
	end
	print(result, msg)
	local totalSize = reduce(((function()
		local _accum_0 = { }
		local _len_0 = 1
		local _list_0 = files
		for _index_0 = 1, #_list_0 do
			local file = _list_0[_index_0]
			_accum_0[_len_0] = loadAsync(file, function(data)
				return addToCache(file, data)
			end)
			_len_0 = _len_0 + 1
		end
		return _accum_0
	end)()), 0, function(a, b)
		return a + b
	end)
end
local propA
do
	propA = property(function(self)
		return self._value
	end, function(self, value)
		print("old value: " .. tostring(self._value))
		print("new value: " .. tostring(value))
		self._value = value
	end)
end
local propB
do
	propB = property(function(self)
		return self._value
	end, function(self, value)
		print("old value: " .. tostring(self._value))
		print("new value: " .. tostring(value))
		self._value = value
	end)
end
alert("hi")
local x, y, z
do
	x = (a) < -b
end
do
	x, y, z = b(function(a) end)
end
do
	x, y, z = b(function(a) end)
end
do
	x = a <= b
end
do
	x, y, z = b(function(self, a) end)
end
return nil