Skip to content

Rename enum members can create invalid enum names #278

@helikopterodaktyl

Description

@helikopterodaktyl

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions