aboutsummaryrefslogtreecommitdiff
path: root/rip.hs
diff options
context:
space:
mode:
Diffstat (limited to 'rip.hs')
-rw-r--r--rip.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/rip.hs b/rip.hs
index 0ad0ed0..34d6647 100644
--- a/rip.hs
+++ b/rip.hs
@@ -331,6 +331,13 @@ rip' code@(x:xs) fns conns st = do
'\'' -> rip' (tail xs) fns conns $ ordI (head xs) : st
+ '"' ->
+ let str = takeWhile (/='"') xs
+ rest = drop (length str + 1) xs
+ in if length str == length xs
+ then riperror "No closing quote in \"string\""
+ else rip' rest fns conns $ reverse (map (fromIntegral . fromEnum) str) ++ st
+
'$' -> do
putStrLn $ '[' : ((intercalate " " . map show . reverse) st) ++ "]"
rip' xs fns conns st