Fix text for some enums with digits#291
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves enum “text” handling across the parsing/generation pipeline so enums (and/or their enumerators) that include digits produce the intended text casing/overrides.
Changes:
CppParser.Parse: supports@textappearing before the first (or next) enumerator by carrying it forward and attaching it to the upcoming enumerator entry.header_loader.CaseConverter: updates PascalCase conversion to usestr.title()for underscore/UPPER inputs so segments likeD3D11don’t get incorrectly downcased toD3d11.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| ProxyStubGenerator/CppParser.py | Applies pending @text to the next parsed enumerator (including the first enumerator in an enum). |
| JsonGenerator/source/header_loader.py | Fixes PascalCase transformation for tokens containing digits by using title() instead of capitalize(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
LuaGenerator ResultsNo changes detected. |
ProxyStubGenerator ResultsChanges detected. |
JsonGenerator ResultsChanges detected. |
VeithMetro
approved these changes
Jun 23, 2026
LuaGenerator ResultsNo changes detected. |
JsonGenerator ResultsChanges detected. |
ProxyStubGenerator ResultsChanges detected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.