Debian Codegraph @

crates/wit-component/tests/interfaces/doc-comments/foo.wit.print

raw
1 /// package docs;
2 package foo:foo;
3
4 /// interface docs
5 interface coverage-iface {
6 /// basic typedef docs
7 type t = u32;
8
9 /// record typedef docs
10 record r {
11 /// record field docs
12 f1: u8,
13 f2: u8,
14 }
15
16 flags fl {
17 /// flag docs
18 f1,
19 f2,
20 }
21
22 variant v {
23 /// variant case docs
24 c1(u8),
25 c2,
26 }
27
28 enum e {
29 /// enum case docs
30 c1,
31 c2,
32 }
33
34 resource res {
35 /// constructor docs
36 constructor();
37 /// method docs
38 m: func();
39 /// static func docs
40 s: static func();
41 }
42
43 /// interface func docs
44 f: func();
45 }
46
47 /// other comment forms
48 /// multi-line block
49 interface other-comment-forms {
50 /// one doc line
51 /// non-doc in the middle
52 /// another doc line
53 multiple-lines-split: func();
54
55 /// mixed forms; line doc
56 /// plus block doc
57 /// multi-line
58 mixed-forms: func();
59 }
60
61 /// world docs
62 world coverage-world {
63 /// world typedef docs
64 type t = u32;
65 /// world func import docs
66 import imp: func();
67
68 /// world func export docs
69 export exp: func();
70 /// world inline interface docs
71 export i: interface {
72 /// inline interface typedef docs
73 type t = u32;
74
75 /// inline interface func docs
76 f: func();
77 }
78 }