fix ada filename mixedcase with - object oriented

Derived types use caracter '.' in package name. But in the filename dot
are replaced by '-' .

For exemple :
```ada
package Mother_Package.Daughter_Package is
    -- ...
end Mother_Package.Daughter_Package;
```
is in a file named : Mother_Package-Daughter_Package.ads

So function ada_case(word) change the '-' in filename to dot in the
package name with mixedcase.
This commit is contained in:
Julien Pivard 2016-08-05 13:50:55 +02:00
parent 8c052b8975
commit 4f498954ab

View File

@ -5,7 +5,9 @@ global !p
def ada_case(word): def ada_case(word):
out = word[0].upper() out = word[0].upper()
for i in range(1, len(word)): for i in range(1, len(word)):
if word[i - 1] == '_': if word[i] == '-':
out = out + '.'
elif word[i - 1] == '_' or word[i - 1] == '-':
out = out + word[i].upper() out = out + word[i].upper()
else: else:
out = out + word[i] out = out + word[i]