summaryrefslogtreecommitdiff
path: root/src/Hint/Lexer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Hint/Lexer.hs')
-rw-r--r--src/Hint/Lexer.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Hint/Lexer.hs b/src/Hint/Lexer.hs
index 7aad9a4..19d1266 100644
--- a/src/Hint/Lexer.hs
+++ b/src/Hint/Lexer.hs
@@ -40,6 +40,11 @@ data TokenKind
| TEquals
| KeywordLet
| KeywordIn
+ | KeywordTrue
+ | KeywordFalse
+ | KeywordIf
+ | KeywordThen
+ | KeywordElse
deriving (Show, Eq)
data Span = Span SourcePos SourcePos
@@ -129,6 +134,11 @@ lexKeyword :: Lexer TokenKind
lexKeyword = asum $
[ KeywordLet <$ string "let"
, KeywordIn <$ string "in"
+ , KeywordTrue <$ string "true"
+ , KeywordFalse <$ string "false"
+ , KeywordIf <$ string "if"
+ , KeywordThen <$ string "then"
+ , KeywordElse <$ string "else"
]
lexIdent :: Lexer TokenKind