added parser and eval stub
This commit is contained in:
9
src/BC/Eval.hs
Normal file
9
src/BC/Eval.hs
Normal file
@@ -0,0 +1,9 @@
|
||||
module BC.Eval (eval) where
|
||||
|
||||
import BC.Types
|
||||
|
||||
eval :: [Value] -> Value
|
||||
eval [x@(BInt _)] = x
|
||||
eval [(BOp x)] = BErr ("operation " ++ x ++ " requires arguments")
|
||||
eval (x:xy) = x
|
||||
eval [] = BOp ""
|
Reference in New Issue
Block a user