This commit is contained in:
2025-09-05 21:32:33 +01:00
parent 223fec53e9
commit 4b6f8513c2

View File

@@ -106,7 +106,7 @@ parseZorth = fst . head . runParser pZorth
handleSymbol :: ZorthAST -> IO ()
handleSymbol (ZorthASTInteger i) = void $ printf " push %d\n" i
handleSymbol (ZorthASTWord "_") = do
handleSymbol (ZorthASTWord "+") = do
putStrLn " pop rbx"
putStrLn " pop rax"
putStrLn " add rax, rbx"
@@ -131,7 +131,7 @@ handleSymbol (ZorthASTWord "swap") = do
putStrLn " push rbx"
handleSymbol (ZorthASTWord "drop") = do
putStrLn " add rsp, 8"
handleSymbol (ZorthASTWord "печать") = do
handleSymbol (ZorthASTWord ".") = do
putStrLn " pop rbx"
putStrLn " call print_number"