mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
23 lines
303 B
Perl
23 lines
303 B
Perl
terra foo()
|
|
var c = 3
|
|
escape
|
|
local a = 1
|
|
for i = 1,10 do
|
|
emit quote c = c + a end
|
|
end
|
|
end
|
|
return c
|
|
end
|
|
|
|
assert(foo() == 13)
|
|
|
|
terra foo2()
|
|
return escape emit(1) end
|
|
end
|
|
|
|
assert(1 == foo2())
|
|
|
|
a = terralib.newlist()
|
|
a:insert quote
|
|
foo()
|
|
end |