Skip to content

Commit f028db8

Browse files
committed
Edit name processing docs
1 parent 4cbab9f commit f028db8

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

docs/for-contributors/Generator/name-processing.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ This section explains how names flow through the SilkTouch generator pipeline.
2929
- The affixes are first stripped → `CreateSwapchain`
3030
- The base name is "prettified" (pascal-casing, removal of underscores) → `CreateSwapchain` (No change in this case)
3131
- Affixes are reapplied according to user configuration → `CreateSwapchainKHR`
32-
- We usually remove shared prefixes and preserve Khronos vendor suffixes verbatim
33-
(notably in contradiction with the Framework Design Guidelines).
34-
The reasons for this are explained below.
32+
- Silk's bindings remove shared prefixes since these represent C namespace prefixes and preserve Khronos vendor
33+
suffixes verbatim for emphasis (notably in contradiction with the Framework Design Guidelines).
3534

3635
4. Mods strip most metadata from the generated bindings to keep the output clean.
37-
- We generally keep metadata useful for users, while removing internal generator metadata.
36+
- Silk's bindings keep metadata useful for users, while removing internal generator metadata.
3837
- For example, `[NativeName]` is kept and `[NameAffix]` is removed during the `StripAttributes` mod.
3938
- Tip: Disabling the `StripAttributes` mod can be helpful for debugging unwanted outputs.
4039

@@ -384,10 +383,10 @@ public struct GamepadBindingInput;
384383
public struct GamepadBindingInputAxis;
385384
```
386385

387-
Limitation: Only simple references are allowed because references are resolved manually by `PrettifyNames`. For example,
388-
`nameof(GamepadBinding.Member)` will not work because member access expressions are not handled. Currently, only
389-
identifiers that exist in the current scope or parent scope can be referenced. That said, this should be enough for most
390-
use cases.
386+
Limitation: Only simple references are allowed because references are resolved manually by `PrettifyNames` and not by
387+
Roslyn. For example, `nameof(GamepadBinding.Member)` will not work because member access expressions are not handled.
388+
Currently, only identifiers that exist in the current scope or parent scope can be referenced. That said, this should be
389+
enough for most use cases.
391390

392391
## Symbol-based Renamer
393392

0 commit comments

Comments
 (0)