Add canonicalization to source & use paths (#421)

Also added file path print to FileNotFound error
This commit is contained in:
Jakub Žádník
2021-12-03 21:49:11 +02:00
committed by GitHub
parent 405a4e58c7
commit ee45755ea9
3 changed files with 102 additions and 81 deletions

View File

@ -24,6 +24,17 @@ pub struct ImportPattern {
}
impl ImportPattern {
pub fn new() -> Self {
ImportPattern {
head: ImportPatternHead {
name: vec![],
span: Span::unknown(),
},
members: vec![],
hidden: HashSet::new(),
}
}
pub fn span(&self) -> Span {
let mut spans = vec![self.head.span];
@ -50,3 +61,9 @@ impl ImportPattern {
}
}
}
impl Default for ImportPattern {
fn default() -> Self {
Self::new()
}
}