parse functions whose name is a keyword
This commit is contained in:
parent
90e66f4888
commit
c0b4358d89
2 changed files with 110 additions and 33 deletions
tools/Language/SQL/SimpleSQL
|
@ -20,6 +20,7 @@ Tests for parsing value expressions
|
|||
> ,subqueries
|
||||
> ,aggregates
|
||||
> ,windowFunctions
|
||||
> ,functionsWithReservedNames
|
||||
> ]
|
||||
|
||||
> literals :: TestItem
|
||||
|
@ -404,3 +405,11 @@ target_string
|
|||
> [("(a)", Parens (Iden [Name Nothing "a"]))
|
||||
> ,("(a + b)", Parens (BinOp (Iden [Name Nothing "a"]) [Name Nothing "+"] (Iden [Name Nothing "b"])))
|
||||
> ]
|
||||
|
||||
> functionsWithReservedNames :: TestItem
|
||||
> functionsWithReservedNames = Group "functionsWithReservedNames" $ map t
|
||||
> ["abs"
|
||||
> ,"char_length"
|
||||
> ]
|
||||
> where
|
||||
> t fn = TestValueExpr ansi2011 (fn ++ "(a)") $ App [Name Nothing fn] [Iden [Name Nothing "a"]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue