mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
18 lines
339 B
Perl
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() |