Skip to content

Handle enumeration members that starts with a numeric value

Emmanuele Bassi requested to merge ebassi/issue-418 into main

We should emit a warning if the tokenized name of an enumeration member starts with a number.

This MR introduces a change in how enumerations are parsed: we add a leading underscore to the member name, to ensure that we're not going to generate an invalid identifier. Extant libraries already have this kind of members, so this will introduce an IABI change; of course, since this kind of identifiers were unusable, it should not really matter, unless a language binding decided to add an override.

Fixes: #418 (closed)

Edited by Emmanuele Bassi

Merge request reports