diff --git a/Language/SQL/SimpleSQL/Pretty.lhs b/Language/SQL/SimpleSQL/Pretty.lhs index 0673f29..eff2a87 100644 --- a/Language/SQL/SimpleSQL/Pretty.lhs +++ b/Language/SQL/SimpleSQL/Pretty.lhs @@ -628,6 +628,9 @@ which have been changed to try to improve the layout of the output. > adminOptFor NoAdminOptionFor = empty +> statement _ (StatementComment cs) = vcat $ map comment cs + + == sessions diff --git a/Language/SQL/SimpleSQL/Syntax.lhs b/Language/SQL/SimpleSQL/Syntax.lhs index b92cf38..fc75f16 100644 --- a/Language/SQL/SimpleSQL/Syntax.lhs +++ b/Language/SQL/SimpleSQL/Syntax.lhs @@ -537,6 +537,7 @@ I'm not sure if this is valid syntax or not. > | SetNames > | SetTransform > | SetCollation -} +> | StatementComment [Comment] > deriving (Eq,Show,Read,Data,Typeable) > data DropBehaviour = diff --git a/TODO b/TODO index ea759e6..fda14b3 100644 --- a/TODO +++ b/TODO @@ -1,16 +1,14 @@ medium tasks next release -rename combinequeryexpr -add comment to statements? -review simple enums to make sure they have default - use enum in sign in interval literal - syntax from hssqlppp: query hints, join hints unescaping identifiers and strings continuation strings testing +add tests for comment pretty printing: + use pretty then lex + work on better dialect design: more basic customizability and rule / callback driven