Bend
Bend copied to clipboard
Report range on diagnostics
Currently, the diagnostic struct is defined as such:
pub struct Diagnostic {
message: String,
severity: Severity,
}
Some diagnostics can be related to code on a specific range of a file, like parsing errors for example. Currently, the location and file in which such errors occur is encoded within the message string, but that makes it difficult to get the source location of these diagnostics after they've been created.
This is especially useful to the language server for Bend we are currently developing.