don't include unfinished tests in the test suite
fix number literals to accept upper case E implement multi part string literals fix tests for string literals, typed literals, boolean literals and number literals in the sql 2003 tests
This commit is contained in:
parent
488310ff6a
commit
19df6f18aa
2 changed files with 79 additions and 58 deletions
Language/SQL/SimpleSQL
|
@ -869,7 +869,7 @@ make this choice.
|
|||
> fracts p = (p++) <$> int
|
||||
> expon p = concat <$> sequence
|
||||
> [return p
|
||||
> ,string "e"
|
||||
> ,(:[]) <$> oneOf "eE"
|
||||
> ,option "" (string "+" <|> string "-")
|
||||
> ,int]
|
||||
|
||||
|
@ -926,10 +926,20 @@ todo: work out the symbol parsing better
|
|||
> >>= optionSuffix moreString)
|
||||
> <?> "string"
|
||||
> where
|
||||
> moreString s0 = try $ do
|
||||
> void $ char '\''
|
||||
> s <- manyTill anyChar (char '\'')
|
||||
> optionSuffix moreString (s0 ++ "'" ++ s)
|
||||
> moreString s0 = try $ choice
|
||||
> [-- handle two adjacent quotes
|
||||
> do
|
||||
> void $ char '\''
|
||||
> s <- manyTill anyChar (char '\'')
|
||||
> optionSuffix moreString (s0 ++ "'" ++ s)
|
||||
> ,-- handle string in separate parts
|
||||
> -- e.g. 'part 1' 'part 2'
|
||||
> do
|
||||
> whitespace
|
||||
> void $ char '\''
|
||||
> s <- manyTill anyChar (char '\'')
|
||||
> optionSuffix moreString (s0 ++ s)
|
||||
> ]
|
||||
|
||||
= helper functions
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue