Skip to content
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

Figure Out How to Display Nodes in Diagnostics #29

Open
harlanhaskins opened this issue Oct 25, 2017 · 0 comments
Open

Figure Out How to Display Nodes in Diagnostics #29

harlanhaskins opened this issue Oct 25, 2017 · 0 comments

Comments

@harlanhaskins
Copy link
Contributor

harlanhaskins commented Oct 25, 2017

Description

Right now, diagnostics contain a reference to a node in the Syntax tree or token stream. This is really powerful, because it means we can just walk up the tree to get more context when we want to print
an expression out -- and because of the libSyntax-style AST, we can faithfully reprint the code from the original file, with all whitespace intact, back to a string.

We need to find a good predictable set of rules for

  • How far to walk up the tree for context
  • What textual ornamentation we want for the code (^ and ~~~~~ for pointing and highlights?)
  • How to highlight specific expressions in the printed code
  • Any other special things we want to do (Rust has some really cool ASCII art diagnostics!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant