diff options
-rw-r--r-- | ABC/Assembler.icl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ABC/Assembler.icl b/ABC/Assembler.icl index 656ea1a..d8e616a 100644 --- a/ABC/Assembler.icl +++ b/ABC/Assembler.icl @@ -32,8 +32,11 @@ where cons :: ![Char] -> [Char] cons [] = [] cons [c:cs] - | isUpper c = ['_':toLower c:cons cs] - | otherwise = [c :cons cs] + | isUpper c + | isMember c ['IB'] && isEmpty cs = [c] + | isMember c ['IB'] && hd cs == '_' = [c :cons cs] + | otherwise = ['_':toLower c:cons cs] + | otherwise = [c :cons cs] derive gPrint Statement |