small tidyups
This commit is contained in:
parent
3fa7086a48
commit
3f0ff9aec0
6 changed files with 11 additions and 17 deletions
Language/SQL/SimpleSQL
|
@ -312,7 +312,6 @@ keyword.
|
|||
> binOpMultiKeywordNames :: [[String]]
|
||||
> binOpMultiKeywordNames = map words
|
||||
> ["not like"
|
||||
> ,"not similar"
|
||||
> ,"is similar to"
|
||||
> ,"is not similar to"
|
||||
> ,"is distinct from"
|
||||
|
@ -353,6 +352,10 @@ The parsers:
|
|||
> opSymbol = choice (map (try . symbol) prefixUnOpSymbolNames
|
||||
> ++ map (try . keyword) prefixUnOpKeywordNames)
|
||||
|
||||
TODO: the handling of multikeyword args is different in
|
||||
postfixopsuffix and binaryoperatorsuffix. It should be the same in
|
||||
both cases
|
||||
|
||||
> postfixOpSuffix :: ScalarExpr -> P ScalarExpr
|
||||
> postfixOpSuffix e =
|
||||
> try $ choice $ map makeOp opPairs
|
||||
|
@ -463,9 +466,6 @@ expression tree (for efficiency and code clarity).
|
|||
|
||||
= query expressions
|
||||
|
||||
TODO: maybe refactor all the parsers. A parser wouldn't usually be
|
||||
optional or use try itself. The caller could do this.
|
||||
|
||||
== select lists
|
||||
|
||||
> selectItem :: P (Maybe String, ScalarExpr)
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
|
||||
This is the pretty printer code which takes AST values and turns them
|
||||
back into SQL source text. It attempts to format the output nicely.
|
||||
|
||||
> -- | These is the pretty printing functions, which produce SQL
|
||||
> -- source from ASTs. The code attempts to format the output in a
|
||||
> -- readable way.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue