summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCamil Staps2018-02-07 12:28:39 +0100
committerCamil Staps2018-02-07 12:28:39 +0100
commit62544aa6b3944876ae4a62076a67d3cd746e0d64 (patch)
treee7e6df9ce5b6a6e342580a807ae10403e9e6fbdc
parentMinor changes to Lex and Syntax (diff)
Add TArrow
-rw-r--r--src/SPL/Lex.hs2
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)