Create compiler facade for Tokenizer, Parser and Emitter
This commit is contained in:
10
app/Assembler/Compiler.hs
Normal file
10
app/Assembler/Compiler.hs
Normal file
@@ -0,0 +1,10 @@
|
||||
module Assembler.Compiler where
|
||||
|
||||
import Data.Word (Word8)
|
||||
|
||||
import Assembler.Tokenizer (tokenize)
|
||||
import Assembler.Parser (parse)
|
||||
import Assembler.Emitter (emit)
|
||||
|
||||
compile :: String -> Either String [Word8]
|
||||
compile input = return input >>= tokenize >>= parse >>= emit
|
||||
Reference in New Issue
Block a user