Skip to content

Commit 648699d

Browse files
committed
chore: update schema
1 parent 954f69f commit 648699d

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

mrdox.rnc

+47-11
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55
#
66
# Copyright (c) 2023 Klemens Morgenstern ([email protected])
7+
# Copyright (c) 2023 Krystian Stasiowski ([email protected])
78
#
89
# Official repository: https://github.com/cppalliance/mrdox
910
#
@@ -59,10 +60,9 @@ grammar
5960
BaseInfo =
6061
element base
6162
{
62-
Name,
6363
Access ?,
6464
attribute class { "virtual" } ?,
65-
ID
65+
TypeInfo
6666
}
6767

6868
#---------------------------------------------
@@ -76,13 +76,13 @@ grammar
7676
Location *,
7777
(
7878
Attr * |
79-
element return { attribute type { text }, ID ? } |
79+
element return { TypeInfo } |
8080
element param
8181
{
8282
Name?,
83-
attribute type { text },
8483
attribute default { text } ?,
85-
ID ?
84+
ID ?,
85+
TypeInfo
8686
} * |
8787
Javadoc ?
8888
) *
@@ -95,9 +95,9 @@ grammar
9595
{
9696
Name,
9797
attribute class {"scoped"} ?,
98-
attribute type { text } ?,
9998
ID,
10099
Location *,
100+
BaseInfo ?,
101101
element value
102102
{
103103
Name,
@@ -114,14 +114,14 @@ grammar
114114
Name,
115115
ID,
116116
Location *,
117-
element type { Name, ID ? }
117+
TypeInfo
118118
} |
119119
element typedef
120120
{
121121
Name,
122122
ID,
123123
Location *,
124-
element type { Name, ID ? }
124+
TypeInfo
125125
}
126126

127127
#---------------------------------------------
@@ -136,7 +136,7 @@ grammar
136136
Location,
137137
(
138138
Attr * &
139-
element type { Name, ID ? } &
139+
TypeInfo &
140140
Javadoc ?
141141
)
142142
}
@@ -152,7 +152,7 @@ grammar
152152
Location *,
153153
(
154154
Attr * &
155-
element type { Name, ID ? } &
155+
TypeInfo &
156156
Javadoc ?
157157
)
158158
}
@@ -293,4 +293,40 @@ grammar
293293
Name = attribute name { text }
294294

295295
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

Comments
 (0)