lexer tweaks
combine hostparam with prefixed variable refactor some of the lexing code slightly fix error in tests where it was using the ansi dialect instead of postgres for testing :::, etc.
This commit is contained in:
parent
31f9912faa
commit
ee4098e189
5 changed files with 24 additions and 41 deletions
tools/Language/SQL/SimpleSQL
|
@ -33,7 +33,7 @@ Test for the lexer
|
|||
> -- preserve the case of the u
|
||||
> ++ map (\i -> ("u&\"" ++ i ++ "\"", [Identifier (Just ("u&\"","\"")) i])) idens
|
||||
> -- host param
|
||||
> ++ map (\i -> (':':i, [HostParam i])) idens
|
||||
> ++ map (\i -> (':':i, [PrefixedVariable ':' i])) idens
|
||||
> )
|
||||
> -- quoted identifiers with embedded double quotes
|
||||
> -- the lexer doesn't unescape the quotes
|
||||
|
@ -154,7 +154,7 @@ also: do the testing for the ansi compatibility special cases
|
|||
> -- preserve the case of the u
|
||||
> ++ map (\i -> ("u&\"" ++ i ++ "\"", [Identifier (Just ("u&\"","\"")) i])) idens
|
||||
> -- host param
|
||||
> ++ map (\i -> (':':i, [HostParam i])) idens
|
||||
> ++ map (\i -> (':':i, [PrefixedVariable ':' i])) idens
|
||||
> )
|
||||
> -- positional var
|
||||
> ++ [("$1", [PositionalArg 1])]
|
||||
|
@ -246,9 +246,9 @@ the + or -.
|
|||
> -- need more tests for */ to make sure it is caught if it is in the middle of a
|
||||
> -- sequence of symbol letters
|
||||
> [LexFails postgres "*/"
|
||||
> ,LexFails ansi2011 ":::"
|
||||
> ,LexFails ansi2011 "::::"
|
||||
> ,LexFails ansi2011 ":::::"
|
||||
> ,LexFails postgres ":::"
|
||||
> ,LexFails postgres "::::"
|
||||
> ,LexFails postgres ":::::"
|
||||
> ,LexFails postgres "@*/"
|
||||
> ,LexFails postgres "-*/"
|
||||
> ,LexFails postgres "12e3e4"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue