The pipeline is finally reasonably clean

This commit is contained in:
2023-09-12 01:26:46 +01:00
parent 6693d93944
commit 8c866967a9
86 changed files with 1959 additions and 1393 deletions

View File

@@ -1,5 +1,3 @@
use std::rc::Rc;
use super::ProjectError;
use crate::representations::location::Location;
use crate::{Interner, VName};
@@ -10,10 +8,8 @@ use crate::{Interner, VName};
pub struct TooManySupers {
/// The offending import path
pub path: VName,
/// The file containing the offending import
pub offender_file: VName,
/// The module containing the offending import
pub offender_mod: VName,
/// The faulty import statement
pub location: Location,
}
impl ProjectError for TooManySupers {
fn description(&self) -> &str {
@@ -22,13 +18,12 @@ impl ProjectError for TooManySupers {
}
fn message(&self) -> String {
format!(
"path {} in {} contains too many `super` steps.",
"path {} contains too many `super` steps.",
Interner::extern_all(&self.path).join("::"),
Interner::extern_all(&self.offender_mod).join("::")
)
}
fn one_position(&self) -> Location {
Location::File(Rc::new(Interner::extern_all(&self.offender_file)))
self.location.clone()
}
}