@@ -131,12 +131,21 @@ impl GodotXmlDocs {
131131 ) ;
132132 }
133133
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
135136 match godot_type {
136137 "String" => "GodotString" ,
137138 "Error" => "GodotError" ,
138139 "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" ,
140149 "G6DOFJointAxisParam" => "G6dofJointAxisParam" ,
141150 "G6DOFJointAxisFlag" => "G6dofJointAxisFlag" ,
142151 _ => godot_type,
@@ -202,7 +211,7 @@ impl GodotXmlDocs {
202211 // [Type] style
203212 let godot_doc = type_regex. replace_all ( & godot_doc, |c : & Captures | {
204213 let godot_ty = & c[ 2 ] ;
205- let rust_ty = Self :: to_rust_type ( godot_ty) ;
214+ let rust_ty = Self :: translate_type ( godot_ty) ;
206215
207216 format ! (
208217 "[`{godot_ty}`][{rust_ty}]" ,
@@ -214,7 +223,7 @@ impl GodotXmlDocs {
214223 // [Type::member] style
215224 let godot_doc = class_member_regex. replace_all ( & godot_doc, |c : & Captures | {
216225 let godot_ty = & c[ 2 ] ;
217- let rust_ty = Self :: to_rust_type ( godot_ty) ;
226+ let rust_ty = Self :: translate_type ( godot_ty) ;
218227
219228 format ! (
220229 "[`{godot_ty}.{member}`][{rust_ty}::{member}]" ,
0 commit comments