mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-25 18:55:35 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
24
samples/Terra/latelink.t
Normal file
24
samples/Terra/latelink.t
Normal file
@@ -0,0 +1,24 @@
|
||||
C = terralib.includecstring [[
|
||||
typedef struct {
|
||||
int a;
|
||||
} S;
|
||||
typedef struct {
|
||||
S a;
|
||||
} A;
|
||||
]]
|
||||
C2 = terralib.includecstring [[
|
||||
typedef struct {
|
||||
int a;
|
||||
} S;
|
||||
typedef struct {
|
||||
S a;
|
||||
} B;
|
||||
]]
|
||||
|
||||
terra second()
|
||||
var a : C2.B
|
||||
var b : C.A
|
||||
|
||||
a.a = b.a
|
||||
end
|
||||
second:disas()
|
||||
Reference in New Issue
Block a user