diff options
Diffstat (limited to 'codegen/lib/utils.py')
| -rw-r--r-- | codegen/lib/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/codegen/lib/utils.py b/codegen/lib/utils.py index c3d293c0..efabbb38 100644 --- a/codegen/lib/utils.py +++ b/codegen/lib/utils.py @@ -10,7 +10,8 @@ def to_snake_case(name: str): def to_camel_case(name: str): - s = re.sub('_([a-z])', lambda m: m.group(1).upper(), name) + s = re.sub('[_ ](\w)', lambda m: m.group(1).upper(), + name.replace('.', '_').replace('/', '_')) s = upper_first_letter(s) # if the first character is a number, we need to add an underscore # maybe we could convert it to the number name (like 2 would become "two")? |
