aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/eolian/data/struct.eo
blob: cb664f366c244751e803903f0ffc3c068dca3290 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
struct Named {
    field: ptr(int);
    something: string;
    arr: static_array<int, 16>;
    tarr: terminated_array<string>;
}

struct Another {
    field: Named;
}

/* opaque struct */
struct Opaque;

struct @extern Not.Generated {
    field: int;
}

class Struct {
   methods {
      foo {
         [[Foo docs. This is $monospace. This is alone-standing $.]]
         params {
            idx: int;
         }
         return: mstring @owned;
      }
      bar {
         return: ptr(Named);
      }
   }
}