aboutsummaryrefslogtreecommitdiff
path: root/ABC/Assembler.icl
diff options
context:
space:
mode:
Diffstat (limited to 'ABC/Assembler.icl')
-rw-r--r--ABC/Assembler.icl7
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