mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-02-12 03:09:31 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
14
samples/Terra/unsafesym.t
Normal file
14
samples/Terra/unsafesym.t
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
local mymacro = macro(function(a)
|
||||
a = a:asvalue()
|
||||
print(a, terralib.issymbol(a), terralib.unsafetypeofsymbol(a))
|
||||
return {}
|
||||
end)
|
||||
|
||||
|
||||
|
||||
terra foo(a : int)
|
||||
mymacro(a)
|
||||
end
|
||||
|
||||
foo:compile()
|
||||
Reference in New Issue
Block a user