mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-03 19:36:16 +01:00
glib-mkenums: Don't treat typedef enum _SomeIdentifier {} as syntax error
Previously we were only detecting typedef\*senum\s*\{, which does not handle the case where there is an entifier for the enum itself but not the typedef. glib-mkenums would then attempt to read the next line looking for a matching {, but in vain. https://bugzilla.gnome.org/show_bug.cgi?id=794506
This commit is contained in:
parent
09f3918952
commit
145e45f55d
@ -457,7 +457,7 @@ def process_file(curfilename):
|
|||||||
if re.match(r'\s*typedef\s+enum.*;', line):
|
if re.match(r'\s*typedef\s+enum.*;', line):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
m = re.match(r'''\s*typedef\s+enum\s*
|
m = re.match(r'''\s*typedef\s+enum\s*[_A-Za-z]*[_A-Za-z0-9]*\s*
|
||||||
({)?\s*
|
({)?\s*
|
||||||
(?:/\*<
|
(?:/\*<
|
||||||
(([^*]|\*(?!/))*)
|
(([^*]|\*(?!/))*)
|
||||||
|
Loading…
Reference in New Issue
Block a user