1
Fork 0

move #iden to sql server dialect

This commit is contained in:
Jake Wheat 2016-02-21 23:50:23 +02:00
parent 83b16edb1f
commit 92c537fce2
2 changed files with 3 additions and 5 deletions

View file

@ -215,7 +215,7 @@ use try because : and @ can be part of other things also
> [PrefixedVariable <$> char ':' <*> identifierString > [PrefixedVariable <$> char ':' <*> identifierString
> ,guard (diSyntaxFlavour d == SQLServer) >> > ,guard (diSyntaxFlavour d == SQLServer) >>
> PrefixedVariable <$> char '@' <*> identifierString > PrefixedVariable <$> char '@' <*> identifierString
> ,guard (diSyntaxFlavour d == Oracle) >> > ,guard (diSyntaxFlavour d == SQLServer) >>
> PrefixedVariable <$> char '#' <*> identifierString > PrefixedVariable <$> char '#' <*> identifierString
> ] > ]

View file

@ -293,15 +293,13 @@ the + or -.
> sqlServerLexerTests = Group "sqlServerLexTests" $ > sqlServerLexerTests = Group "sqlServerLexTests" $
> [ LexTest sqlserver s t | (s,t) <- > [ LexTest sqlserver s t | (s,t) <-
> [("@variable", [(PrefixedVariable '@' "variable")]) > [("@variable", [(PrefixedVariable '@' "variable")])
> ,("#variable", [(PrefixedVariable '#' "variable")])
> ,("[quoted identifier]", [(Identifier (Just ("[", "]")) "quoted identifier")]) > ,("[quoted identifier]", [(Identifier (Just ("[", "]")) "quoted identifier")])
> ]] > ]]
> oracleLexerTests :: TestItem > oracleLexerTests :: TestItem
> oracleLexerTests = Group "oracleLexTests" $ > oracleLexerTests = Group "oracleLexTests" $
> [ LexTest oracle s t | (s,t) <- > [] -- nothing oracle specific atm
> [("#variable", [(PrefixedVariable '#' "variable")])
> ]
> ]
> mySqlLexerTests :: TestItem > mySqlLexerTests :: TestItem
> mySqlLexerTests = Group "mySqlLexerTests" $ > mySqlLexerTests = Group "mySqlLexerTests" $