Implement Parsing for Tokens of AST

This commit is contained in:
Laborratte 5 2024-07-17 21:21:28 +02:00
parent 39d77eafe0
commit 9d1a80bf2b
Signed by: Laborratte5
GPG key ID: 3A30072E35202C02
2 changed files with 51 additions and 1 deletions

View file

@ -7,7 +7,7 @@ data Token = Plus
| Integer Int
| LBrace
| RBrace
deriving Show
deriving (Eq, Show)
lex :: String -> [Token]
lex source = reverse (lex' source [] (length source))