blob: 8f54ceff2e092537032d15d5668284b8a510c0d6 [file] [log] [blame]
John Snowe2bbc4e2021-02-01 14:37:39 -05001module ./builtin
Markus Armbruster8a847672018-02-11 10:35:54 +01002object q_empty
Marc-André Lureau1e381b62018-12-13 16:37:05 +04003enum QType
Markus Armbruster8a847672018-02-11 10:35:54 +01004 prefix QTYPE
Marc-André Lureau1e381b62018-12-13 16:37:05 +04005 member none
6 member qnull
7 member qnum
8 member qstring
9 member qdict
10 member qlist
11 member qbool
Markus Armbrustercf40a0a2018-02-11 10:35:55 +010012module doc-good.json
Marc-André Lureau1e381b62018-12-13 16:37:05 +040013enum Enum
14 member one
Marc-André Lureaua35c9bf2018-12-13 16:37:20 +040015 if ['defined(IFONE)']
Marc-André Lureau1e381b62018-12-13 16:37:05 +040016 member two
Marc-André Lureau901a34a2018-07-03 17:56:46 +020017 if ['defined(IFCOND)']
Markus Armbruster013b4ef2020-03-17 12:54:37 +010018 feature enum-feat
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010019object Base
20 member base1: Enum optional=False
Markus Armbruster8a847672018-02-11 10:35:54 +010021object Variant1
22 member var1: str optional=False
Marc-André Lureau8867bf02018-12-13 16:37:21 +040023 if ['defined(IFSTR)']
Markus Armbruster84ab0082020-03-17 12:54:45 +010024 feature member-feat
Markus Armbruster79598c82019-10-18 10:14:53 +020025 feature variant1-feat
Markus Armbruster8a847672018-02-11 10:35:54 +010026object Variant2
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010027object Object
28 base Base
29 tag base1
30 case one: Variant1
31 case two: Variant2
Marc-André Lureau01ae9cc2018-12-13 16:37:22 +040032 if ['IFTWO']
Markus Armbruster013b4ef2020-03-17 12:54:37 +010033 feature union-feat1
Markus Armbruster8a847672018-02-11 10:35:54 +010034object q_obj_Variant1-wrapper
35 member data: Variant1 optional=False
36object q_obj_Variant2-wrapper
37 member data: Variant2 optional=False
Marc-André Lureau1e381b62018-12-13 16:37:05 +040038enum SugaredUnionKind
39 member one
40 member two
Marc-André Lureau01ae9cc2018-12-13 16:37:22 +040041 if ['IFTWO']
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010042object SugaredUnion
43 member type: SugaredUnionKind optional=False
44 tag type
45 case one: q_obj_Variant1-wrapper
46 case two: q_obj_Variant2-wrapper
Marc-André Lureau01ae9cc2018-12-13 16:37:22 +040047 if ['IFTWO']
Markus Armbruster013b4ef2020-03-17 12:54:37 +010048 feature union-feat2
Markus Armbrusterf6401de2019-10-24 13:02:21 +020049alternate Alternate
50 tag type
51 case i: int
52 case b: bool
Markus Armbruster013b4ef2020-03-17 12:54:37 +010053 feature alt-feat
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010054object q_obj_cmd-arg
55 member arg1: int optional=False
56 member arg2: str optional=True
57 member arg3: bool optional=False
Markus Armbruster8a847672018-02-11 10:35:54 +010058command cmd q_obj_cmd-arg -> Object
Markus Armbruster758f2722019-10-18 10:14:50 +020059 gen=True success_response=True boxed=False oob=False preconfig=False
Markus Armbruster79598c82019-10-18 10:14:53 +020060 feature cmd-feat1
61 feature cmd-feat2
Markus Armbruster8a847672018-02-11 10:35:54 +010062command cmd-boxed Object -> None
Markus Armbruster758f2722019-10-18 10:14:50 +020063 gen=True success_response=True boxed=True oob=False preconfig=False
Markus Armbruster79598c82019-10-18 10:14:53 +020064 feature cmd-feat1
65 feature cmd-feat2
Markus Armbrusterd4f4cae2021-03-23 10:40:10 +010066event EVT_BOXED Object
Markus Armbruster717cfcf2019-10-24 13:02:20 +020067 boxed=True
Markus Armbruster013b4ef2020-03-17 12:54:37 +010068 feature feat3
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010069doc freeform
70 body=
71= Section
Markus Armbrusterdcdc07a2020-03-20 10:18:05 +010072doc freeform
73 body=
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010074== Subsection
75
Peter Maydellb09c8f72020-09-25 17:23:07 +010076*with emphasis*
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010077@var {in braces}
Peter Maydell63a97cf2020-09-25 17:22:58 +010078
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010079* List item one
Peter Maydell63a97cf2020-09-25 17:22:58 +010080* Two, multiple
Peter Maydell99dff362020-09-25 17:22:59 +010081 lines
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010082
Peter Maydell63a97cf2020-09-25 17:22:58 +010083* Three
Peter Maydell99dff362020-09-25 17:22:59 +010084 Still in list
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010085
86Not in list
Peter Maydell63a97cf2020-09-25 17:22:58 +010087
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010088- Second list
Peter Maydell99dff362020-09-25 17:22:59 +010089 Note: still in list
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010090
91Note: not in list
Peter Maydell63a97cf2020-09-25 17:22:58 +010092
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100931. Third list
Peter Maydell99dff362020-09-25 17:22:59 +010094 is numbered
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010095
Peter Maydell63a97cf2020-09-25 17:22:58 +0100962. another item
Markus Armbruster80d1f2e2017-03-20 14:11:54 +010097
98Returns: the King
99Since: the first age
100Notes:
101
1021. Lorem ipsum dolor sit amet
103
1042. Ut enim ad minim veniam
105
106Duis aute irure dolor
107
108Example:
109
110-> in
111<- out
112Examples:
113- *verbatim*
114- {braces}
115doc symbol=Enum
116 body=
Markus Armbrustercfa438f2017-10-02 16:13:35 +0200117
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100118 arg=one
119The _one_ {and only}
120 arg=two
121
Markus Armbruster013b4ef2020-03-17 12:54:37 +0100122 feature=enum-feat
123Also _one_ {and only}
Markus Armbrusterfc3f0df2017-10-02 16:13:37 +0200124 section=None
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100125@two is undocumented
126doc symbol=Base
127 body=
128
129 arg=base1
130the first member
131doc symbol=Variant1
132 body=
133A paragraph
134
135Another paragraph (but no @var: line)
136 arg=var1
137
Markus Armbrustera0418a42019-10-24 13:02:22 +0200138 feature=variant1-feat
139a feature
Markus Armbruster84ab0082020-03-17 12:54:45 +0100140 feature=member-feat
141a member feature
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100142doc symbol=Variant2
143 body=
144
145doc symbol=Object
146 body=
147
Markus Armbruster013b4ef2020-03-17 12:54:37 +0100148 feature=union-feat1
149a feature
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100150doc symbol=SugaredUnion
151 body=
152
153 arg=type
154
Markus Armbruster013b4ef2020-03-17 12:54:37 +0100155 feature=union-feat2
156a feature
Markus Armbrusterf6401de2019-10-24 13:02:21 +0200157doc symbol=Alternate
158 body=
159
160 arg=i
161an integer
Peter Maydella69a6d42020-09-25 17:23:00 +0100162@b is undocumented
Markus Armbrusterf6401de2019-10-24 13:02:21 +0200163 arg=b
164
Markus Armbruster013b4ef2020-03-17 12:54:37 +0100165 feature=alt-feat
166a feature
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100167doc freeform
168 body=
169== Another subsection
170doc symbol=cmd
171 body=
172
173 arg=arg1
174the first argument
175 arg=arg2
176the second
Peter Maydella69a6d42020-09-25 17:23:00 +0100177argument
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100178 arg=arg3
179
Markus Armbrustera0418a42019-10-24 13:02:22 +0200180 feature=cmd-feat1
181a feature
182 feature=cmd-feat2
183another feature
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100184 section=Note
185@arg3 is undocumented
186 section=Returns
187@Object
188 section=TODO
189frobnicate
190 section=Notes
191- Lorem ipsum dolor sit amet
192- Ut enim ad minim veniam
193
194Duis aute irure dolor
195 section=Example
196-> in
197<- out
198 section=Examples
199- *verbatim*
200- {braces}
201 section=Since
2022.10
203doc symbol=cmd-boxed
204 body=
205If you're bored enough to read this, go see a video of boxed cats
Markus Armbrustera0418a42019-10-24 13:02:22 +0200206 feature=cmd-feat1
207a feature
208 feature=cmd-feat2
209another feature
Markus Armbruster80d1f2e2017-03-20 14:11:54 +0100210 section=Example
211-> in
212
213<- out
Markus Armbrusterd4f4cae2021-03-23 10:40:10 +0100214doc symbol=EVT_BOXED
Markus Armbruster717cfcf2019-10-24 13:02:20 +0200215 body=
Markus Armbrusterb621a262019-10-24 13:02:24 +0200216
Markus Armbruster013b4ef2020-03-17 12:54:37 +0100217 feature=feat3
218a feature