mirror of
https://github.com/KevinMidboe/linguist.git
synced 2026-01-14 21:35:53 +00:00
samples: add Terra samples
source: https://github.com/zdevito/terra/tree/master/tests
This commit is contained in:
14
samples/Terra/missingfields.t
Normal file
14
samples/Terra/missingfields.t
Normal file
@@ -0,0 +1,14 @@
|
||||
test = terralib.includecstring([[
|
||||
typedef struct {} emptyanon;
|
||||
typedef struct foo foobar;
|
||||
void test(struct foo * f);
|
||||
struct foo { int x; };
|
||||
union ufoo;
|
||||
typedef union { int a; int b; } anonunion;
|
||||
]])
|
||||
terra main()
|
||||
var s : test.foo
|
||||
s.x = 1
|
||||
end
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user