diff options
author | Camil Staps | 2018-02-07 12:28:39 +0100 |
---|---|---|
committer | Camil Staps | 2018-02-07 12:28:39 +0100 |
commit | 62544aa6b3944876ae4a62076a67d3cd746e0d64 (patch) | |
tree | e7e6df9ce5b6a6e342580a807ae10403e9e6fbdc | |
parent | Minor changes to Lex and Syntax (diff) |
Add TArrow
-rw-r--r-- | src/SPL/Lex.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/SPL/Lex.hs b/src/SPL/Lex.hs index 1843cdd..21b8a82 100644 --- a/src/SPL/Lex.hs +++ b/src/SPL/Lex.hs @@ -27,6 +27,7 @@ data Token | TSemicolon | TDot | TComma + | TArrow | TIf | TWhile @@ -120,6 +121,7 @@ lex s = (comment s <|> item s <|> int s <|> char s <|> bool s <|> ident s) >>= item ('&':'&':s) = pure (TAmpAmp, s) item ('|':'|':s) = pure (TPipePipe, s) item (':':':':s) = pure (TColonColon, s) + item ('-':'>':s) = pure (TArrow, s) item ('(':s) = pure (TParenOpen, s) item (')':s) = pure (TParenClose, s) item ('[':s) = pure (TBrackOpen, s) |