mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
mkenums: make string raw for real regex
Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
This commit is contained in:
parent
d753a411c0
commit
615238d0a4
@ -84,7 +84,7 @@ def parse_entries(file, file_name):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
if looking_for_name:
|
if looking_for_name:
|
||||||
m = re.match('\s*(\w+)', line)
|
m = re.match(r'\s*(\w+)', line)
|
||||||
if m:
|
if m:
|
||||||
enumname = m.group(1)
|
enumname = m.group(1)
|
||||||
return True
|
return True
|
||||||
@ -141,7 +141,7 @@ def parse_entries(file, file_name):
|
|||||||
entries.append((name, value, options['nick']))
|
entries.append((name, value, options['nick']))
|
||||||
else:
|
else:
|
||||||
entries.append((name, value))
|
entries.append((name, value))
|
||||||
elif re.match('s*\#', line):
|
elif re.match(r's*\#', line):
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
sys.exit("Failed to parse %s." % file_name)
|
sys.exit("Failed to parse %s." % file_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user