Read input for Lexer from file

This commit is contained in:
Laborratte 5 2024-07-16 00:05:15 +02:00
parent 34bad5af43
commit b51be83eff
Signed by: Laborratte5
GPG key ID: 3A30072E35202C02
2 changed files with 6 additions and 1 deletions

View file

@ -1,4 +1,8 @@
module Main where module Main where
import qualified Lexer
main :: IO () main :: IO ()
main = putStrLn "Hello, Haskell!" main = do
source <- readFile "arithmetic.txt"
putStr $ show (Lexer.lex source)

1
arithmetic.txt Normal file
View file

@ -0,0 +1 @@
1 + 22 * (3 - 4)