-
Notifications
You must be signed in to change notification settings - Fork 0
/
async.lua
37 lines (33 loc) · 1.02 KB
/
async.lua
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
F = {
ParOr = function (me)
ASR(not _ITER'Async'(), me,'not permitted inside async')
end,
ParAnd = function (me)
ASR(not _ITER'Async'(), me,'not permitted inside async')
end,
ParEver = function (me)
ASR(not _ITER'Async'(), me,'not permitted inside async')
end,
EmitE = function (me)
local acc,_ = unpack(me)
if acc.evt.dir == 'internal' then
ASR(not _ITER'Async'(), me,'not permitted inside async')
else -- input
ASR(_ITER'Async'(), me, 'not permitted outside async')
end
end,
EmitT = function (me)
ASR(_ITER'Async'(), me,'not permitted outside async')
end,
Async_pos = function (me)
ASR(not _ITER'Async'(), me,'not permitted inside async')
end,
AwaitE = function (me)
local acc,_ = unpack(me)
ASR(not _ITER'Async'(), me,'not permitted inside async')
end,
AwaitT = function (me)
ASR(not _ITER'Async'(), me,'not permitted inside async')
end,
}
_VISIT(F)