mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +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
0a42a7cb74
commit
7027a128c1
@ -457,7 +457,7 @@ def process_file(curfilename):
|
||||
if re.match(r'\s*typedef\s+enum.*;', line):
|
||||
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*
|
||||
(?:/\*<
|
||||
(([^*]|\*(?!/))*)
|
||||
|
Loading…
Reference in New Issue
Block a user