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

Merge pull request #218 from alnr/ddl2cpp_include_guard_allow_digits

Allow digits 0-9 in include guards
This commit is contained in:
Roland Bock 2018-02-13 11:19:50 +01:00 committed by GitHub
commit a611905628
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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):