aboutsummaryrefslogtreecommitdiff
path: root/ABC/Assembler.icl
diff options
context:
space:
mode:
authorCamil Staps2017-07-18 08:58:14 +0000
committerCamil Staps2017-07-18 08:58:14 +0000
commitbfd43976b9afa83b7625e9c2491b21af3d611982 (patch)
tree960a25956ae5dbbc23fc1d7081ce9be9392cf6e4 /ABC/Assembler.icl
parentAdd annotations (diff)
Raw annotations
Diffstat (limited to 'ABC/Assembler.icl')
-rw-r--r--ABC/Assembler.icl5
1 files changed, 5 insertions, 0 deletions
diff --git a/ABC/Assembler.icl b/ABC/Assembler.icl
index 087945d..2e80a05 100644
--- a/ABC/Assembler.icl
+++ b/ABC/Assembler.icl
@@ -32,6 +32,11 @@ where
printAnnot :: Annotation -> String
printAnnot (DAnnot a bs) = ".d " <+ a <+ " " <+ length bs <+ " " <+ types bs
printAnnot (OAnnot a bs) = ".o " <+ a <+ " " <+ length bs <+ " " <+ types bs
+ printAnnot (RawAnnot s) = foldl (+++) "." (intersperse " " s)
+ where
+ intersperse g [] = []
+ intersperse g [x] = [x]
+ intersperse g [x:xs] = [x:g:intersperse g xs]
types :: ([BasicType] -> [Char])
types = map toC