File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ impl GodotXmlDocs {
136
136
"String" => "GodotString" ,
137
137
"Error" => "GodotError" ,
138
138
"RID" => "Rid" ,
139
+ // TODO PoolVector3Array etc
139
140
"G6DOFJointAxisParam" => "G6dofJointAxisParam" ,
140
141
"G6DOFJointAxisFlag" => "G6dofJointAxisFlag" ,
141
142
_ => godot_type,
@@ -152,11 +153,28 @@ impl GodotXmlDocs {
152
153
} ;
153
154
154
155
// TODO reuse regex across classes
156
+
157
+ // Covers:
158
+ // * [url=U]text[/url]
159
+ // * [url=U][/url]
155
160
let url_regex = Regex :: new ( "\\ [url=(.+?)](.*?)\\ [/url]" ) . unwrap ( ) ;
156
161
157
- let type_regex = Regex :: new ( "\\ [enum ([A-Za-z0-9_]+?)]" ) . unwrap ( ) ;
162
+ // Covers:
163
+ // * [C]
164
+ // * [enum C]
165
+ let type_regex = Regex :: new ( "\\ [(enum )?([A-Za-z0-9_]+?)]" ) . unwrap ( ) ;
166
+
167
+ // Covers:
168
+ // * [member M]
169
+ // * [method M]
170
+ // * [constant M]
158
171
let self_member_regex =
159
172
Regex :: new ( "\\ [(member|method|constant) ([A-Za-z0-9_]+?)]" ) . unwrap ( ) ;
173
+
174
+ // Covers:
175
+ // * [member C.M]
176
+ // * [method C.M]
177
+ // * [constant C.M]
160
178
let class_member_regex =
161
179
Regex :: new ( "\\ [(member|method|constant) ([A-Za-z0-9_]+?)\\ .([A-Za-z0-9_]+?)]" ) . unwrap ( ) ;
162
180
@@ -183,7 +201,7 @@ impl GodotXmlDocs {
183
201
184
202
// [Type] style
185
203
let godot_doc = type_regex. replace_all ( & godot_doc, |c : & Captures | {
186
- let godot_ty = & c[ 1 ] ;
204
+ let godot_ty = & c[ 2 ] ;
187
205
let rust_ty = Self :: to_rust_type ( godot_ty) ;
188
206
189
207
format ! (
You can’t perform that action at this time.
0 commit comments