@@ -220,7 +220,7 @@ digits = some digit
220||| Recognise a single hexidecimal digit
220||| Recognise a single hexidecimal digit
222hexDigit : Lexer
222hexDigit : Lexer
223−hexDigit = digit <|> oneOf "abcdefABCDEF"
223+hexDigit = pred isHexDigit
225||| Recognise one or more hexidecimal digits
225||| Recognise one or more hexidecimal digits
@@ -325,7 +325,7 @@ intLit = opt (is '-') <+> digits
325||| Recognise a hexidecimal literal, prefixed by "0x" or "0X"
325||| Recognise a hexidecimal literal, prefixed by "0x" or "0X"
327hexLit : Lexer
327hexLit : Lexer
328−hexLit = is '0' <+> oneOf "xX" <+> hexDigits
328+hexLit = approx "0x" <+> hexDigits
330||| A mapping from lexers to the tokens they produce.
330||| A mapping from lexers to the tokens they produce.
331||| This is a list of pairs `(Lexer, String -> tokenType)`
331||| This is a list of pairs `(Lexer, String -> tokenType)`