1
Fork 0

tweak lexer tests

This commit is contained in:
Jake Wheat 2015-08-02 15:58:09 +03:00
parent 3b5deec2e5
commit 056cd1afda

View file

@ -47,7 +47,7 @@ Test for the lexer
> | a <- " \n\t", b <- " \n\t"] > | a <- " \n\t", b <- " \n\t"]
> -- line comment > -- line comment
> ++ map (\c -> (c, [LineComment c])) > ++ map (\c -> (c, [LineComment c]))
> ["--", "-- ", "-- this is a comment"] > ["--", "-- ", "-- this is a comment", "-- line com\n"]
> -- block comment > -- block comment
> ++ map (\c -> (c, [BlockComment c])) > ++ map (\c -> (c, [BlockComment c]))
> ["/**/", "/* */","/* this is a comment */" > ["/**/", "/* */","/* this is a comment */"
@ -103,7 +103,7 @@ number number (todo: double check more carefully)
> ,(isUQIdentifier, isQIdentifier) > ,(isUQIdentifier, isQIdentifier)
> ,(isString, isString) > ,(isString, isString)
> ,(isCsString, isString) > ,(isCsString, isString)
> ,(isLineComment, const True) > ,(isEofLineComment, const True)
> ,(isNumber, isNumber) > ,(isNumber, isNumber)
> ,(isHostParam,isIdentifier) > ,(isHostParam,isIdentifier)
> ,(isHostParam,isCsString) > ,(isHostParam,isCsString)
@ -123,7 +123,9 @@ number number (todo: double check more carefully)
> isUQIdentifier _ = False > isUQIdentifier _ = False
> isCsString (CSSqlString {}) = True > isCsString (CSSqlString {}) = True
> isCsString _ = False > isCsString _ = False
> isLineComment (LineComment{}) = True > isEofLineComment (LineComment s) = last s /= '\n'
> isEofLineComment _ = False
> isLineComment (LineComment {}) = True
> isLineComment _ = False > isLineComment _ = False
> isNumber (SqlNumber{}) = True > isNumber (SqlNumber{}) = True
> isNumber _ = False > isNumber _ = False