Add API to emit type-checking diagnostics (#12988)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Micha Reiser 2024-08-20 09:22:30 +02:00 committed by GitHub
parent 38c19fb96e
commit c65e3310d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 337 additions and 142 deletions

View file

@ -254,6 +254,12 @@ impl Debug for SourceLocation {
}
}
impl std::fmt::Display for SourceLocation {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "{row}:{column}", row = self.row, column = self.column)
}
}
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum SourceRow {
/// A row within a cell in a Jupyter Notebook.