pretty tree output (like pest.rs sandbox) #650
shanemikel
started this conversation in
General
Replies: 3 comments
-
The code that formats the output is in the site repo. While this might seem like a good idea, it will probably not be an area of focus for the next major version of pest since we're exploring ways of deprecating the |
Beta Was this translation helpful? Give feedback.
0 replies
-
@dragostis Thank god (or just the Pest devs)! The Pairs API is awful to use. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Holy crap that implementation is soo much cleaner than mine. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't seem to find any methods or functions for the pretty tree output you have in the pest.rs sandbox tool.
The output is like so:
I find that this has been really nice for debugging, so I implemented my own (pretty ugly) version of it here (https://gist.github.com/shanemikel/72e4a71452a7663749c6cb030136b855). From what I can tell, it produces the exact same output as the website.
I would very much appreciate if the already implemented version would be exposed in the pest library itself.
This brings me to a question. The following line from this function (line no. 23... can't figure out how to link a line from the gist):
Now does this simply clone the iterator, or make a deep copy of the entire parse tree?
Beta Was this translation helpful? Give feedback.
All reactions