add fancy prompt before input

This commit is contained in:
Oleg Sobolev 2025-12-25 19:00:01 +03:00
parent 7bec9392c3
commit 061303ccc0

View file

@ -1,6 +1,7 @@
import Lox.Scanner import Lox.Scanner
import Lox.Parser import Lox.Parser
import Lox.Interpreter import Lox.Interpreter
import System.IO
run :: String -> IO () run :: String -> IO ()
run source = print result run source = print result
@ -9,4 +10,4 @@ run source = print result
tokens = scanTokensFromSource source tokens = scanTokensFromSource source
main :: IO () main :: IO ()
main = getLine >>= run main = putStr ">> " >> hFlush stdout >> getLine >>= run