Implement Parsing for Tokens of AST
This commit is contained in:
parent
39d77eafe0
commit
9d1a80bf2b
2 changed files with 51 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue