Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename enum members can create invalid enum names #278

Open
helikopterodaktyl opened this issue Oct 25, 2021 · 1 comment
Open

Rename enum members can create invalid enum names #278

helikopterodaktyl opened this issue Oct 25, 2021 · 1 comment
Labels

Comments

@helikopterodaktyl
Copy link

helikopterodaktyl commented Oct 25, 2021

Example when attempting to convert webgpu headers. Reproduced with dstep 1.0.3:

typedef enum WGPUTextureDimension { WGPUTextureDimension_1D = 0x00000000, WGPUTextureDimension_2D = 0x00000001, WGPUTextureDimension_3D = 0x00000002, WGPUTextureDimension_Force32 = 0x7FFFFFFF } WGPUTextureDimension;

with --rename-enum-members=true results in:

enum WGPUTextureDimension { 1d = 0x00000000, 2d = 0x00000001, 3d = 0x00000002, force32 = 0x7FFFFFFF }

enum names can't begin with a number. Perhaps _1d should be used instead in such case?

@jacob-carlborg
Copy link
Owner

Oh, yeah, that's a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants