Debian Codegraph @

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

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 /// world docs
48 world coverage-world {
49 /// world func import docs
50 import imp: func();
51
52 /// world typedef docs
53 type t = u32;
54
55 /// world inline interface docs
56 export i: interface {
57 /// inline interface typedef docs
58 type t = u32;
59
60 /// inline interface func docs
61 f: func();
62 }
63 /// world func export docs
64 export exp: func();
65 }
66
67 /** other comment forms
68 multi-line block */
69 interface other-comment-forms {
70 /// one doc line
71 // non-doc in the middle
72 /// another doc line
73 multiple-lines-split: func();
74
75 /// mixed forms; line doc
76 /** plus block doc
77 multi-line */
78 mixed-forms: func();
79 }