1
Fork 0

add support for [] quoted identifiers and for #var, @var

This commit is contained in:
Jake Wheat 2016-02-15 20:33:11 +02:00
parent b22cde4100
commit 9adce162e5
2 changed files with 20 additions and 13 deletions
tools/Language/SQL/SimpleSQL

View file

@ -16,6 +16,7 @@ Test for the lexer
> ,postgresLexerTests
> ,sqlServerLexerTests
> ,oracleLexerTests
> ,mySqlLexerTests
> ,odbcLexerTests]]
> ansiLexerTable :: [(String,[Token])]
@ -283,7 +284,7 @@ the + or -.
> sqlServerLexerTests = Group "sqlServerLexTests" $
> [ LexTest sqlserver s t | (s,t) <-
> [("@variable", [(PrefixedVariable '@' "variable")])
> --,("[quoted identifier]", [(Identifier (Just ("[", "]")) "variable")])
> ,("[quoted identifier]", [(Identifier (Just ("[", "]")) "quoted identifier")])
> ]]
> oracleLexerTests :: TestItem
@ -293,6 +294,13 @@ the + or -.
> ]
> ]
> mySqlLexerTests :: TestItem
> mySqlLexerTests = Group "mySqlLexerTests" $
> [ LexTest mysql s t | (s,t) <-
> [("`quoted identifier`", [(Identifier (Just ("`", "`")) "quoted identifier")])
> ]
> ]
> odbcLexerTests :: TestItem
> odbcLexerTests = Group "odbcLexTests" $
> [ LexTest sqlserver {- {odbc = True} -} s t | (s,t) <-