fix(library/constants): more Io -> IO

This commit is contained in:
Sebastian Ullrich
2019-03-21 19:27:05 +01:00
committed by Leonardo de Moura
parent c017686f70
commit 20451918a6
4 changed files with 18 additions and 19 deletions

View File

@@ -20,8 +20,8 @@ def error(msg):
exit(1)
def to_c_const(s):
# insert '_' instead of '.' and between lower case and upper case
s = re.sub(r"\.|(?<=[a-z0-9])(?=[A-Z])", '_', s)
# insert '_' instead of '.', between lower case and upper case, and after 'IO'
s = re.sub(r"\.|(?<=[a-z0-9])(?=[A-Z])|(?<=IO)(?=[A-Z][a-z])", '_', s)
return s.lower()
def main(argv=None):