mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-12-08 04:18:48 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
24
samples/Terra/shallowfreeze.t
Normal file
24
samples/Terra/shallowfreeze.t
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
struct B {
|
||||
d : int
|
||||
}
|
||||
struct A {
|
||||
b : &B;
|
||||
c : int;
|
||||
d : int;
|
||||
e : int;
|
||||
}
|
||||
|
||||
|
||||
terra foo() : A
|
||||
return A {nil}
|
||||
end
|
||||
|
||||
foo:disas()
|
||||
|
||||
print(foo())
|
||||
|
||||
|
||||
|
||||
terralib.dumpmodule()
|
||||
Reference in New Issue
Block a user