test.lc 822 Bytes
Newer Older
1
typedef struct {
2
  (foo:bar) int val;
3
4
} coord;

5
6
typedef int anInt;

7
typedef void avoid;
8
sample (function:"a trigger")(foo:bar) avoid doavoid;
9

10
sample (a:b) "A struct: an int and a ref." struct {
11
  (e:f)(c:d) int x;
12
13
14
  sample reference;
} intAndRef;

15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
typedef struct {
  coord x;
  coord y;
} point;

typedef struct {
  point start;
  point end;
} line;

typedef struct {
  int a;
  int b;
  boolean c;
} foo;

31
sample struct {
32
33
34
  (name:l1)line l1;
  (name:l2)line l2;
  (b:"kalle anka")(c:hejdu)(a:"kalle anka")foo  f;
35
} twoLines;
36
37
38
39
40

sample struct {
  int a;
  int b;
} twoInts;
41
42
43

sample anInt theFirstInt;
sample anInt theSecondInt;
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59

sample struct {
    struct {
        int x;
        int y;
    } s1;

    struct {
        int a;
        int b;
    } s2;

    int i;
    double double_array[2,3,_][3][_];
} twoStructsAndInt;