-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't support Union in an IOContext? #4
Comments
Thanks for the report! On JuliaLang/julia#49231, any thoughts about whether this or parsing-independent construction method is superior? I'm playing with an approach in the |
I had prototyped a version of an IO object that supported semantic annotations during printing in https://github.com/JuliaLang/julia/pull/27430/files#diff-7e4f858605d8e7631cf8ddaf624fd67f8acd65fce49ab3c1b9613ed491290787 and https://github.com/vtjnash/Firelight.jl/blob/master/src/richprint0_6.jl, so I might be slightly biased on that question haha. |
In the Firelight.jl repo there, I was building an experiment where I wanted it to be both tree-like and text-like. It was a type that was intended to be similar to html, or a templating language for html, where you have plain text, rendered text, and also source information for each character. The goal there was to build a GUI, so that if you clicked on anything, it could give you a reference to that element in the backend representation, and then collapse, fold, expand, navigate to, or re-render any part of it interactively. |
So if I'm interpreting you correctly, you like the IO approach? That was my initial expectation; I developed a few doubts when I saw some of the bugs that my early implementations were vulnerable to, but my attempts at the other approach have given me a renewed appreciation of why that's hard, too. In which case maybe the best thing to do is fix the bugs in JuliaLang/julia#49231 and be done with it. So unless you disagree, I'll probably just proceed with the IO approach and not waste any more time on alternatives. |
Yes, I liked the IO approach, but I also wanted to modify IO so that it emitted begin/next/end tags for each portion of the objects too so that it could be navigated as a tree too |
The text was updated successfully, but these errors were encountered: