added comments
This commit is contained in:
@@ -52,6 +52,8 @@ data Environment = Environment { label :: Int
|
||||
|
||||
handleSymbol :: Handle -> ZorthExpr -> StateT Environment IO ()
|
||||
|
||||
handleSymbol _ (ZorthASTComment _) = return ()
|
||||
|
||||
handleSymbol h (ZorthASTInteger i) =
|
||||
do
|
||||
liftIO $ hPutStrLn h $ " push "<>show i
|
||||
@@ -87,7 +89,7 @@ handleSymbol h (ZorthASTWord "/") = do
|
||||
\ pop rax\n\
|
||||
\ cqo\n\
|
||||
\ idiv rbx\n\
|
||||
\ imul rax, rbx\n"
|
||||
\ push rax\n"
|
||||
return ()
|
||||
|
||||
handleSymbol h (ZorthASTWord "ret") = do
|
||||
|
||||
Reference in New Issue
Block a user