aboutsummaryrefslogtreecommitdiff
path: root/ABC/Assembler.icl
diff options
context:
space:
mode:
authorCamil Staps2017-07-18 13:19:01 +0000
committerCamil Staps2017-07-18 13:19:01 +0000
commit3cf27f6916409d1203aea8cb0a685ae8e983f023 (patch)
treee1acb4cee21fb8464807f9c3b97950a7be3b423c /ABC/Assembler.icl
parentRaw annotations (diff)
Raw instructions
Diffstat (limited to 'ABC/Assembler.icl')
-rw-r--r--ABC/Assembler.icl9
1 files changed, 6 insertions, 3 deletions
diff --git a/ABC/Assembler.icl b/ABC/Assembler.icl
index 2e80a05..57ad36a 100644
--- a/ABC/Assembler.icl
+++ b/ABC/Assembler.icl
@@ -15,10 +15,11 @@ where
instance <<< Assembler
where
- <<< f [] = f
- <<< f [stm=:(Label _):r] = f <<< stm <<< "\r\n" <<< r
+ <<< f [ ] = f
+ <<< f [stm=:(Label _) :r] = f <<< stm <<< "\r\n" <<< r
<<< f [stm=:(Descriptor _ _ _ _):r] = f <<< r
- <<< f [stm=:(Annotation _):r] = f <<< stm <<< "\r\n" <<< r
+ <<< f [stm=:(Annotation _) :r] = f <<< stm <<< "\r\n" <<< r
+ <<< f [stm=:(Raw _) :r] = f <<< stm <<< "\r\n" <<< r
<<< f [stm :r] = f <<< "\t" <<< stm <<< "\r\n" <<< r
instance <<< Statement where <<< f st = f <<< toString st
@@ -55,6 +56,7 @@ gPrint{|CONS of d|} fx (CONS x) = case d.gcd_name of
"Print" = ['print\t"'] ++ quote (fx x) ++ ['"']
"Comment" = ['| '] ++ fx x
"Annotation" = fx x
+ "Raw" = fx x
name = tl (cons (fromString name)) ++ ['\t':fx x]
where
cons :: ![Char] -> [Char]
@@ -125,6 +127,7 @@ translate [Label _ :r] lc syms = translate r lc syms
translate [Descriptor _ _ _ _:r] lc syms = translate r lc syms
translate [Comment _ :r] lc syms = translate r lc syms
translate [Annotation _ :r] lc syms = translate r lc syms
+translate [Raw _ :r] lc syms = translate r lc syms
translate [stm :r] lc syms
= [trans stm lc syms:translate r (lc+1) syms]
where