Describe Lexical Error as such in error message.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
This commit is contained in:
Henner Zeller 2019-09-16 11:31:40 -07:00
parent ff75e175be
commit 4cabdd96e0
1 changed files with 2 additions and 2 deletions

View File

@ -518,12 +518,12 @@ lexFile includePaths env path = do
alexEOF :: Alex ()
alexEOF = return ()
-- raises an alexError with the current file position appended
-- raises an alexError with the current file position
lexicalError :: String -> Alex a
lexicalError msg = do
(pn, _, _, _) <- alexGetInput
pos <- toTokPos pn
alexError $ show pos ++ "error: " ++ msg
alexError $ show pos ++ ": Lexical error: " ++ msg
-- get the current user state
get :: Alex AlexUserState