1
Fork 0

trivial tweaks

This commit is contained in:
Jake Wheat 2024-01-10 17:05:56 +00:00
parent add2e373a0
commit 382555b060
4 changed files with 16 additions and 10 deletions

View file

@ -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

View file

@ -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