aboutsummaryrefslogtreecommitdiff
path: root/ABC/Assembler.icl
diff options
context:
space:
mode:
authorCamil Staps2016-07-06 12:55:14 +0200
committerCamil Staps2016-07-06 13:17:43 +0200
commitcef4bc5f01c2ae66bd7c6170149ea30f9019559c (patch)
tree2e457b34a4eb7a3513783f69c8ea09ff7f88000f /ABC/Assembler.icl
parenttoString for Assembler (and Statement) (diff)
Fix toString for fillI and similar instructions
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