4
4
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5
5
#
6
6
# Copyright (c) 2023 Klemens Morgenstern (
[email protected] )
7
+ # Copyright (c) 2023 Krystian Stasiowski (
[email protected] )
7
8
#
8
9
# Official repository: https://github.com/cppalliance/mrdox
9
10
#
@@ -59,10 +60,9 @@ grammar
59
60
BaseInfo =
60
61
element base
61
62
{
62
- Name,
63
63
Access ?,
64
64
attribute class { "virtual" } ?,
65
- ID
65
+ TypeInfo
66
66
}
67
67
68
68
#---------------------------------------------
@@ -76,13 +76,13 @@ grammar
76
76
Location *,
77
77
(
78
78
Attr * |
79
- element return { attribute type { text }, ID ? } |
79
+ element return { TypeInfo } |
80
80
element param
81
81
{
82
82
Name?,
83
- attribute type { text },
84
83
attribute default { text } ?,
85
- ID ?
84
+ ID ?,
85
+ TypeInfo
86
86
} * |
87
87
Javadoc ?
88
88
) *
@@ -95,9 +95,9 @@ grammar
95
95
{
96
96
Name,
97
97
attribute class {"scoped"} ?,
98
- attribute type { text } ?,
99
98
ID,
100
99
Location *,
100
+ BaseInfo ?,
101
101
element value
102
102
{
103
103
Name,
@@ -114,14 +114,14 @@ grammar
114
114
Name,
115
115
ID,
116
116
Location *,
117
- element type { Name, ID ? }
117
+ TypeInfo
118
118
} |
119
119
element typedef
120
120
{
121
121
Name,
122
122
ID,
123
123
Location *,
124
- element type { Name, ID ? }
124
+ TypeInfo
125
125
}
126
126
127
127
#---------------------------------------------
@@ -136,7 +136,7 @@ grammar
136
136
Location,
137
137
(
138
138
Attr * &
139
- element type { Name, ID ? } &
139
+ TypeInfo &
140
140
Javadoc ?
141
141
)
142
142
}
@@ -152,7 +152,7 @@ grammar
152
152
Location *,
153
153
(
154
154
Attr * &
155
- element type { Name, ID ? } &
155
+ TypeInfo &
156
156
Javadoc ?
157
157
)
158
158
}
@@ -293,4 +293,40 @@ grammar
293
293
Name = attribute name { text }
294
294
295
295
Attr = element attr { ID, Name ?, attribute value { text } ? }
296
- }
296
+
297
+ TypeInfo = (
298
+ element (
299
+ type |
300
+ pointee-type |
301
+ pattern-type |
302
+ element-type |
303
+ return-type |
304
+ param-type
305
+ )
306
+ {
307
+ attribute class
308
+ {
309
+ "builtin" |
310
+ "tag" |
311
+ "specialization" |
312
+ "lvalue-reference" |
313
+ "rvalue-reference" |
314
+ "pointer" |
315
+ "member-pointer" |
316
+ "array" |
317
+ "function" |
318
+ "pack"
319
+ } ?,
320
+ ID ?,
321
+ Name ?,
322
+ attribute parent { text } ?,
323
+ attribute cv-qualifiers { "const"|"volatile"|"const volatile" } ?,
324
+ attribute ref-qualifier { "&"|"&&" } ?,
325
+ attribute exception-spec { text } ?,
326
+ attribute bounds-value { text } ?,
327
+ attribute bounds-expr { text } ?,
328
+ TemplateArg *,
329
+ TypeInfo *
330
+ }
331
+ )
332
+ }
0 commit comments