added comments

This commit is contained in:
2025-09-07 18:54:55 +01:00
parent c323e84a00
commit cd527903c2
4 changed files with 18 additions and 4 deletions

View File

@@ -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