Files
linguist/samples/Terra/anon3.t
2016-01-28 11:22:27 +07:00

18 lines
339 B
Perl

C,T = terralib.includecstring [[
struct D {
struct { int a; struct { int c; } c; } b;
} c;
typedef struct {int c;} B;
typedef struct {
struct { int a; } a;
struct { int b; } b;
B c;
} A;
]]
terra foo(a : &C.A)
var c = a.a
var b = a.b.b
return c.a + b + a.c.c;
end
foo:compile()