1
Fork 0

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:
Jake Wheat 2014-04-17 19:19:41 +03:00
parent 488310ff6a
commit 19df6f18aa
2 changed files with 79 additions and 58 deletions
Language/SQL/SimpleSQL

View file

@ -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