|
|
|
|
|
by sundarurfriend
1115 days ago
|
|
I thought working with the lossless syntax tree was the key to Rust's pin-point precise error messages. How does rust-analyzer get and print the specific point of error if it throws away the non-essential information before that stage? I suppose the position information is stored along with the Error nodes, in the original parsing? |
|
I'm not sure exactly how Rust and rust-analyzer keep track of the info necessary to their excellent error messages and diagnostics, but I wouldn't be surprised if pinpoint messages were not the primary motivation for rust-analyzer to do lossless parsing.