From 92c537fce2b348ea3f6af322b5b1a4fa46917e17 Mon Sep 17 00:00:00 2001 From: Jake Wheat Date: Sun, 21 Feb 2016 23:50:23 +0200 Subject: [PATCH] move #iden to sql server dialect --- Language/SQL/SimpleSQL/Lex.lhs | 2 +- tools/Language/SQL/SimpleSQL/LexerTests.lhs | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Language/SQL/SimpleSQL/Lex.lhs b/Language/SQL/SimpleSQL/Lex.lhs index 726ee06..ee3b464 100644 --- a/Language/SQL/SimpleSQL/Lex.lhs +++ b/Language/SQL/SimpleSQL/Lex.lhs @@ -215,7 +215,7 @@ use try because : and @ can be part of other things also > [PrefixedVariable <$> char ':' <*> identifierString > ,guard (diSyntaxFlavour d == SQLServer) >> > PrefixedVariable <$> char '@' <*> identifierString -> ,guard (diSyntaxFlavour d == Oracle) >> +> ,guard (diSyntaxFlavour d == SQLServer) >> > PrefixedVariable <$> char '#' <*> identifierString > ] diff --git a/tools/Language/SQL/SimpleSQL/LexerTests.lhs b/tools/Language/SQL/SimpleSQL/LexerTests.lhs index 63344c4..e74f746 100644 --- a/tools/Language/SQL/SimpleSQL/LexerTests.lhs +++ b/tools/Language/SQL/SimpleSQL/LexerTests.lhs @@ -293,15 +293,13 @@ the + or -. > sqlServerLexerTests = Group "sqlServerLexTests" $ > [ LexTest sqlserver s t | (s,t) <- > [("@variable", [(PrefixedVariable '@' "variable")]) +> ,("#variable", [(PrefixedVariable '#' "variable")]) > ,("[quoted identifier]", [(Identifier (Just ("[", "]")) "quoted identifier")]) > ]] > oracleLexerTests :: TestItem > oracleLexerTests = Group "oracleLexTests" $ -> [ LexTest oracle s t | (s,t) <- -> [("#variable", [(PrefixedVariable '#' "variable")]) -> ] -> ] +> [] -- nothing oracle specific atm > mySqlLexerTests :: TestItem > mySqlLexerTests = Group "mySqlLexerTests" $