add very rough framework of how the parse might need to change

This commit is contained in:
Brendan Hansknecht 2023-03-22 15:45:33 -07:00
parent 1059c81d33
commit 99547086ee
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
6 changed files with 91 additions and 37 deletions

View file

@ -507,5 +507,11 @@ fn fmt_imports_entry<'a, 'buf>(buf: &mut Buf<'buf>, entry: &ImportsEntry<'a>, in
fmt_collection(buf, indent, Braces::Curly, *entries, Newlines::No)
}
}
IngestedFile(file_name, typed_ident) => {
fmt_str_literal(buf, *file_name, indent);
buf.push_str(" as ");
typed_ident.format(buf, 0);
}
}
}

View file

@ -420,6 +420,9 @@ impl<'a> RemoveSpaces<'a> for ImportsEntry<'a> {
match *self {
ImportsEntry::Module(a, b) => ImportsEntry::Module(a, b.remove_spaces(arena)),
ImportsEntry::Package(a, b, c) => ImportsEntry::Package(a, b, c.remove_spaces(arena)),
ImportsEntry::IngestedFile(a, b) => {
ImportsEntry::IngestedFile(a, b.remove_spaces(arena))
}
}
}
}