Adds `.word` directive parsing.
authorMoritz Angermann <moritz.angermann@gmail.com>
Mon, 5 Mar 2018 01:44:53 +0000 (09:44 +0800)
committerMoritz Angermann <moritz.angermann@gmail.com>
Mon, 5 Mar 2018 01:44:53 +0000 (09:44 +0800)
ATTParser.hs

index 93d332e..7dfda46 100644 (file)
@@ -60,6 +60,8 @@ preprocess ('\t':attr) = let (h, t) = break isSpace attr
                                        | otherwise      -> [Ref  $ (w x)]
                          (".long":x:_) | isNumber (w x) -> [Long $ read (w x)]
                                        | otherwise      -> [Ref  $ (w x)]
+                         (".word":x:_) | isNumber (w x) -> [Long $ read (w x)]
+                                       | otherwise      -> [Ref  $ (w x)]
                          (".space":x:_)| (w x) == "4"   -> [Long 0]
                                        | (w x) == "8"   -> [Quad 0]
                          (".ascii":x:_)             -> [Ascii $ read x]