mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-16 14:25:33 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
16
samples/Terra/compilecallback.t
Normal file
16
samples/Terra/compilecallback.t
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
local a = 0
|
||||
local foo = macro(function(arg)
|
||||
bar:gettype(function()
|
||||
a = bar()
|
||||
end)
|
||||
a = 1
|
||||
return 3
|
||||
end)
|
||||
|
||||
terra bar()
|
||||
return foo()
|
||||
end
|
||||
|
||||
assert(bar() == 3)
|
||||
assert(a == 3)
|
||||
Reference in New Issue
Block a user