Commit 06110f9
Merge #812
812: Extend safe name filter to support Godot 3.4 API r=Bromeon a=lufterc
This PR adds 'enum' keyword to rust_safe_name filter and also makes use of this filter for rusty_method_name variable in bindings generator. It allows to build godot-rust with latest stable Godot 3.4 API.
A bit of context: when trying to build bindings for latest stable Godot API, the following errors are produced:
```
error: expected expression, found keyword `enum`
1972 | ..., self . this . sys () . as_ptr () , class . into () , enum . into () , no_inheritance) ; StringArray :: from_sys (ret) } } # [doc = "...
| ^^^^ expected expression
error: expected identifier, found keyword `type`
2302 | ... } # [doc = ""] # [doc = ""] # [inline] pub fn type (& self) -> GodotString { unsafe { let method_bind : * mut sys :: godot_method_bin...
| ^^^^ expected identifier, found keyword
```
It seems that newer API version introduces more keyword collisions which this patch aims to fix.
Co-authored-by: lufterc <lufterd@gmail.com>2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | | - | |
| 349 | + | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| |||
0 commit comments