trivial tweaks
This commit is contained in:
parent
add2e373a0
commit
382555b060
4 changed files with 16 additions and 10 deletions
|
@ -40,13 +40,17 @@ doc _ (ParseScalarExprFails d str) =
|
|||
[Row str (showResult $ P.parseScalarExpr d "" Nothing str)]
|
||||
|
||||
doc _ (LexTest d str t) =
|
||||
[Row str (T.pack $ ppShow $ L.lexSQL d "" Nothing str)]
|
||||
[Row str (showResultL $ L.lexSQL d "" Nothing str)]
|
||||
|
||||
doc _ (LexFails d str) =
|
||||
[Row str (T.pack $ ppShow $ L.lexSQL d "" Nothing str)]
|
||||
[Row str (showResultL $ L.lexSQL d "" Nothing str)]
|
||||
|
||||
showResult :: Show a => Either P.ParseError a -> Text
|
||||
showResult = either P.prettyError (T.pack . ppShow)
|
||||
showResult = either (("Left\n" <>) . P.prettyError) (T.pack . ppShow)
|
||||
|
||||
showResultL :: Show a => Either L.ParseError a -> Text
|
||||
showResultL = either (("Left\n" <>) . L.prettyError) (T.pack . ppShow)
|
||||
|
||||
|
||||
-- TODO: should put the dialect in the html output
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ A big tradeoff here is all code needs to be prepared to deal with the abstract s
|
|||
|
||||
The system probably doesn't always pretty print in the right dialect from correct syntax. This might need some changes if it causes a problem.
|
||||
|
||||
TODO: handling of keywords, and relationship with dialect
|
||||
|
||||
TODO: tests overview in addition to the above
|
||||
|
||||
TODO: how the website works, what it contains
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue