@@ -131,12 +131,21 @@ impl GodotXmlDocs {
131
131
) ;
132
132
}
133
133
134
- fn to_rust_type ( godot_type : & str ) -> & str {
134
+ fn translate_type ( godot_type : & str ) -> & str {
135
+ // Note: there is some code duplication with Ty::from_src() in api.rs
135
136
match godot_type {
136
137
"String" => "GodotString" ,
137
138
"Error" => "GodotError" ,
138
139
"RID" => "Rid" ,
139
- // TODO PoolVector3Array etc
140
+ "AABB" => "Aabb" ,
141
+ "Array" => "VariantArray" ,
142
+ "PoolByteArray" => "ByteArray" ,
143
+ "PoolStringArray" => "StringArray" ,
144
+ "PoolVector2Array" => "Vector2Array" ,
145
+ "PoolVector3Array" => "Vector3Array" ,
146
+ "PoolColorArray" => "ColorArray" ,
147
+ "PoolIntArray" => "Int32Array" ,
148
+ "PoolRealArray" => "Float32Array" ,
140
149
"G6DOFJointAxisParam" => "G6dofJointAxisParam" ,
141
150
"G6DOFJointAxisFlag" => "G6dofJointAxisFlag" ,
142
151
_ => godot_type,
@@ -202,7 +211,7 @@ impl GodotXmlDocs {
202
211
// [Type] style
203
212
let godot_doc = type_regex. replace_all ( & godot_doc, |c : & Captures | {
204
213
let godot_ty = & c[ 2 ] ;
205
- let rust_ty = Self :: to_rust_type ( godot_ty) ;
214
+ let rust_ty = Self :: translate_type ( godot_ty) ;
206
215
207
216
format ! (
208
217
"[`{godot_ty}`][{rust_ty}]" ,
@@ -214,7 +223,7 @@ impl GodotXmlDocs {
214
223
// [Type::member] style
215
224
let godot_doc = class_member_regex. replace_all ( & godot_doc, |c : & Captures | {
216
225
let godot_ty = & c[ 2 ] ;
217
- let rust_ty = Self :: to_rust_type ( godot_ty) ;
226
+ let rust_ty = Self :: translate_type ( godot_ty) ;
218
227
219
228
format ! (
220
229
"[`{godot_ty}.{member}`][{rust_ty}::{member}]" ,
0 commit comments