0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00

Allow digits 0-9 in include guards

This commit is contained in:
Arne Luenser 2018-02-13 10:29:28 +01:00
parent a2b22b9bac
commit 5e8d81adbf

View File

@ -45,7 +45,7 @@ from pyparsing import CaselessLiteral, Literal, SkipTo, restOfLine, oneOf, ZeroO
# HELPERS # HELPERS
def get_include_guard_name(namespace, inputfile): def get_include_guard_name(namespace, inputfile):
val = re.sub("[^A-Za-z]+", "_", namespace + '_' + os.path.basename(inputfile)) val = re.sub("[^A-Za-z0-9]+", "_", namespace + '_' + os.path.basename(inputfile))
return val.upper() return val.upper()
def identity_naming_func(s): def identity_naming_func(s):