From 4f498954ab0cefefeefdfcb9bfecfb334700613e Mon Sep 17 00:00:00 2001 From: Julien Pivard Date: Fri, 5 Aug 2016 13:50:55 +0200 Subject: [PATCH] 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. --- UltiSnips/ada.snippets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UltiSnips/ada.snippets b/UltiSnips/ada.snippets index cc35c2c..bea2a6c 100644 --- a/UltiSnips/ada.snippets +++ b/UltiSnips/ada.snippets @@ -5,7 +5,9 @@ global !p def ada_case(word): out = word[0].upper() 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() else: out = out + word[i]