diff options
author | Camil Staps | 2016-07-06 12:55:14 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-06 13:17:43 +0200 |
commit | cef4bc5f01c2ae66bd7c6170149ea30f9019559c (patch) | |
tree | 2e457b34a4eb7a3513783f69c8ea09ff7f88000f /ABC/Assembler.icl | |
parent | toString for Assembler (and Statement) (diff) |
Fix toString for fillI and similar instructions
Diffstat (limited to 'ABC/Assembler.icl')
-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 |