John Snow | e2bbc4e | 2021-02-01 14:37:39 -0500 | [diff] [blame] | 1 | module ./builtin |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 2 | object q_empty |
Marc-André Lureau | 1e381b6 | 2018-12-13 16:37:05 +0400 | [diff] [blame] | 3 | enum QType |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 4 | prefix QTYPE |
Marc-André Lureau | 1e381b6 | 2018-12-13 16:37:05 +0400 | [diff] [blame] | 5 | member none |
| 6 | member qnull |
| 7 | member qnum |
| 8 | member qstring |
| 9 | member qdict |
| 10 | member qlist |
| 11 | member qbool |
Markus Armbruster | cf40a0a | 2018-02-11 10:35:55 +0100 | [diff] [blame] | 12 | module doc-good.json |
Marc-André Lureau | 1e381b6 | 2018-12-13 16:37:05 +0400 | [diff] [blame] | 13 | enum Enum |
| 14 | member one |
Marc-André Lureau | a35c9bf | 2018-12-13 16:37:20 +0400 | [diff] [blame] | 15 | if ['defined(IFONE)'] |
Marc-André Lureau | 1e381b6 | 2018-12-13 16:37:05 +0400 | [diff] [blame] | 16 | member two |
Marc-André Lureau | 901a34a | 2018-07-03 17:56:46 +0200 | [diff] [blame] | 17 | if ['defined(IFCOND)'] |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 18 | feature enum-feat |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 19 | object Base |
| 20 | member base1: Enum optional=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 21 | object Variant1 |
| 22 | member var1: str optional=False |
Marc-André Lureau | 8867bf0 | 2018-12-13 16:37:21 +0400 | [diff] [blame] | 23 | if ['defined(IFSTR)'] |
Markus Armbruster | 84ab008 | 2020-03-17 12:54:45 +0100 | [diff] [blame] | 24 | feature member-feat |
Markus Armbruster | 79598c8 | 2019-10-18 10:14:53 +0200 | [diff] [blame] | 25 | feature variant1-feat |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 26 | object Variant2 |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 27 | object Object |
| 28 | base Base |
| 29 | tag base1 |
| 30 | case one: Variant1 |
| 31 | case two: Variant2 |
Marc-André Lureau | 01ae9cc | 2018-12-13 16:37:22 +0400 | [diff] [blame] | 32 | if ['IFTWO'] |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 33 | feature union-feat1 |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 34 | object q_obj_Variant1-wrapper |
| 35 | member data: Variant1 optional=False |
| 36 | object q_obj_Variant2-wrapper |
| 37 | member data: Variant2 optional=False |
Marc-André Lureau | 1e381b6 | 2018-12-13 16:37:05 +0400 | [diff] [blame] | 38 | enum SugaredUnionKind |
| 39 | member one |
| 40 | member two |
Marc-André Lureau | 01ae9cc | 2018-12-13 16:37:22 +0400 | [diff] [blame] | 41 | if ['IFTWO'] |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 42 | object 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é Lureau | 01ae9cc | 2018-12-13 16:37:22 +0400 | [diff] [blame] | 47 | if ['IFTWO'] |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 48 | feature union-feat2 |
Markus Armbruster | f6401de | 2019-10-24 13:02:21 +0200 | [diff] [blame] | 49 | alternate Alternate |
| 50 | tag type |
| 51 | case i: int |
| 52 | case b: bool |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 53 | feature alt-feat |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 54 | object q_obj_cmd-arg |
| 55 | member arg1: int optional=False |
| 56 | member arg2: str optional=True |
| 57 | member arg3: bool optional=False |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 58 | command cmd q_obj_cmd-arg -> Object |
Markus Armbruster | 758f272 | 2019-10-18 10:14:50 +0200 | [diff] [blame] | 59 | gen=True success_response=True boxed=False oob=False preconfig=False |
Markus Armbruster | 79598c8 | 2019-10-18 10:14:53 +0200 | [diff] [blame] | 60 | feature cmd-feat1 |
| 61 | feature cmd-feat2 |
Markus Armbruster | 8a84767 | 2018-02-11 10:35:54 +0100 | [diff] [blame] | 62 | command cmd-boxed Object -> None |
Markus Armbruster | 758f272 | 2019-10-18 10:14:50 +0200 | [diff] [blame] | 63 | gen=True success_response=True boxed=True oob=False preconfig=False |
Markus Armbruster | 79598c8 | 2019-10-18 10:14:53 +0200 | [diff] [blame] | 64 | feature cmd-feat1 |
| 65 | feature cmd-feat2 |
Markus Armbruster | d4f4cae | 2021-03-23 10:40:10 +0100 | [diff] [blame] | 66 | event EVT_BOXED Object |
Markus Armbruster | 717cfcf | 2019-10-24 13:02:20 +0200 | [diff] [blame] | 67 | boxed=True |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 68 | feature feat3 |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 69 | doc freeform |
| 70 | body= |
| 71 | = Section |
Markus Armbruster | dcdc07a | 2020-03-20 10:18:05 +0100 | [diff] [blame] | 72 | doc freeform |
| 73 | body= |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 74 | == Subsection |
| 75 | |
Peter Maydell | b09c8f7 | 2020-09-25 17:23:07 +0100 | [diff] [blame] | 76 | *with emphasis* |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 77 | @var {in braces} |
Peter Maydell | 63a97cf | 2020-09-25 17:22:58 +0100 | [diff] [blame] | 78 | |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 79 | * List item one |
Peter Maydell | 63a97cf | 2020-09-25 17:22:58 +0100 | [diff] [blame] | 80 | * Two, multiple |
Peter Maydell | 99dff36 | 2020-09-25 17:22:59 +0100 | [diff] [blame] | 81 | lines |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 82 | |
Peter Maydell | 63a97cf | 2020-09-25 17:22:58 +0100 | [diff] [blame] | 83 | * Three |
Peter Maydell | 99dff36 | 2020-09-25 17:22:59 +0100 | [diff] [blame] | 84 | Still in list |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 85 | |
| 86 | Not in list |
Peter Maydell | 63a97cf | 2020-09-25 17:22:58 +0100 | [diff] [blame] | 87 | |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 88 | - Second list |
Peter Maydell | 99dff36 | 2020-09-25 17:22:59 +0100 | [diff] [blame] | 89 | Note: still in list |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 90 | |
| 91 | Note: not in list |
Peter Maydell | 63a97cf | 2020-09-25 17:22:58 +0100 | [diff] [blame] | 92 | |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 93 | 1. Third list |
Peter Maydell | 99dff36 | 2020-09-25 17:22:59 +0100 | [diff] [blame] | 94 | is numbered |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 95 | |
Peter Maydell | 63a97cf | 2020-09-25 17:22:58 +0100 | [diff] [blame] | 96 | 2. another item |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 97 | |
| 98 | Returns: the King |
| 99 | Since: the first age |
| 100 | Notes: |
| 101 | |
| 102 | 1. Lorem ipsum dolor sit amet |
| 103 | |
| 104 | 2. Ut enim ad minim veniam |
| 105 | |
| 106 | Duis aute irure dolor |
| 107 | |
| 108 | Example: |
| 109 | |
| 110 | -> in |
| 111 | <- out |
| 112 | Examples: |
| 113 | - *verbatim* |
| 114 | - {braces} |
| 115 | doc symbol=Enum |
| 116 | body= |
Markus Armbruster | cfa438f | 2017-10-02 16:13:35 +0200 | [diff] [blame] | 117 | |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 118 | arg=one |
| 119 | The _one_ {and only} |
| 120 | arg=two |
| 121 | |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 122 | feature=enum-feat |
| 123 | Also _one_ {and only} |
Markus Armbruster | fc3f0df | 2017-10-02 16:13:37 +0200 | [diff] [blame] | 124 | section=None |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 125 | @two is undocumented |
| 126 | doc symbol=Base |
| 127 | body= |
| 128 | |
| 129 | arg=base1 |
| 130 | the first member |
| 131 | doc symbol=Variant1 |
| 132 | body= |
| 133 | A paragraph |
| 134 | |
| 135 | Another paragraph (but no @var: line) |
| 136 | arg=var1 |
| 137 | |
Markus Armbruster | a0418a4 | 2019-10-24 13:02:22 +0200 | [diff] [blame] | 138 | feature=variant1-feat |
| 139 | a feature |
Markus Armbruster | 84ab008 | 2020-03-17 12:54:45 +0100 | [diff] [blame] | 140 | feature=member-feat |
| 141 | a member feature |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 142 | doc symbol=Variant2 |
| 143 | body= |
| 144 | |
| 145 | doc symbol=Object |
| 146 | body= |
| 147 | |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 148 | feature=union-feat1 |
| 149 | a feature |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 150 | doc symbol=SugaredUnion |
| 151 | body= |
| 152 | |
| 153 | arg=type |
| 154 | |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 155 | feature=union-feat2 |
| 156 | a feature |
Markus Armbruster | f6401de | 2019-10-24 13:02:21 +0200 | [diff] [blame] | 157 | doc symbol=Alternate |
| 158 | body= |
| 159 | |
| 160 | arg=i |
| 161 | an integer |
Peter Maydell | a69a6d4 | 2020-09-25 17:23:00 +0100 | [diff] [blame] | 162 | @b is undocumented |
Markus Armbruster | f6401de | 2019-10-24 13:02:21 +0200 | [diff] [blame] | 163 | arg=b |
| 164 | |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 165 | feature=alt-feat |
| 166 | a feature |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 167 | doc freeform |
| 168 | body= |
| 169 | == Another subsection |
| 170 | doc symbol=cmd |
| 171 | body= |
| 172 | |
| 173 | arg=arg1 |
| 174 | the first argument |
| 175 | arg=arg2 |
| 176 | the second |
Peter Maydell | a69a6d4 | 2020-09-25 17:23:00 +0100 | [diff] [blame] | 177 | argument |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 178 | arg=arg3 |
| 179 | |
Markus Armbruster | a0418a4 | 2019-10-24 13:02:22 +0200 | [diff] [blame] | 180 | feature=cmd-feat1 |
| 181 | a feature |
| 182 | feature=cmd-feat2 |
| 183 | another feature |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 184 | section=Note |
| 185 | @arg3 is undocumented |
| 186 | section=Returns |
| 187 | @Object |
| 188 | section=TODO |
| 189 | frobnicate |
| 190 | section=Notes |
| 191 | - Lorem ipsum dolor sit amet |
| 192 | - Ut enim ad minim veniam |
| 193 | |
| 194 | Duis aute irure dolor |
| 195 | section=Example |
| 196 | -> in |
| 197 | <- out |
| 198 | section=Examples |
| 199 | - *verbatim* |
| 200 | - {braces} |
| 201 | section=Since |
| 202 | 2.10 |
| 203 | doc symbol=cmd-boxed |
| 204 | body= |
| 205 | If you're bored enough to read this, go see a video of boxed cats |
Markus Armbruster | a0418a4 | 2019-10-24 13:02:22 +0200 | [diff] [blame] | 206 | feature=cmd-feat1 |
| 207 | a feature |
| 208 | feature=cmd-feat2 |
| 209 | another feature |
Markus Armbruster | 80d1f2e | 2017-03-20 14:11:54 +0100 | [diff] [blame] | 210 | section=Example |
| 211 | -> in |
| 212 | |
| 213 | <- out |
Markus Armbruster | d4f4cae | 2021-03-23 10:40:10 +0100 | [diff] [blame] | 214 | doc symbol=EVT_BOXED |
Markus Armbruster | 717cfcf | 2019-10-24 13:02:20 +0200 | [diff] [blame] | 215 | body= |
Markus Armbruster | b621a26 | 2019-10-24 13:02:24 +0200 | [diff] [blame] | 216 | |
Markus Armbruster | 013b4ef | 2020-03-17 12:54:37 +0100 | [diff] [blame] | 217 | feature=feat3 |
| 218 | a feature |