Skip to content

Added support for original field and type naming for C++ language. - #2639

Merged
schani merged 5 commits into
glideapps:masterfrom
basdl:master
Jul 12, 2026
Merged

Added support for original field and type naming for C++ language.#2639
schani merged 5 commits into
glideapps:masterfrom
basdl:master

Conversation

@basdl

@basdl basdl commented Aug 19, 2024

Copy link
Copy Markdown
Contributor

Description

Support for keeping original names for the C++ generator.

Motivation and Context

Previous Behaviour / Output

The CLI had the option for pascal-case, underscore-case, camel-case and others.

New Behaviour / Output

Now it supports original-case for fields and types.

bastian-huber-keen and others added 5 commits August 19, 2024 09:27
The "original" style returned names verbatim, skipping combineWords
entirely, so JSON keys that aren't valid identifiers produced
uncompilable C++ (e.g. "some-header" emitted as a member name, or a
leading-digit key like "9lives"). Route "original" through combineWords
as a single unsplit word instead: casing and legal characters
(including underscores) are preserved exactly, while illegal characters
are stripped, invalid start characters get the usual "the" prefix, and
empty names are handled. This matches the semantics of the existing
"--acronym-style original" option.

Reserved words like "class" were already handled by the renderer's
forbidden-names machinery and still are.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@schani
schani merged commit 88e5db6 into glideapps:master Jul 12, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants