Formatting.

This commit is contained in:
2023-07-22 15:00:07 -07:00
parent f968e20a75
commit 64405d5a06
8 changed files with 70 additions and 57 deletions

View File

@@ -20,7 +20,7 @@ pub struct Program {
}
/// A Name.
///
///
/// This is basically a string, but annotated with the place the string
/// is in the source file.
#[derive(Clone, Debug)]
@@ -31,11 +31,17 @@ pub struct Name {
impl Name {
pub fn new<S: ToString>(n: S, location: Location) -> Name {
Name{ name: n.to_string(), location }
Name {
name: n.to_string(),
location,
}
}
pub fn manufactured<S: ToString>(n: S) -> Name {
Name{ name: n.to_string(), location: Location::manufactured() }
Name {
name: n.to_string(),
location: Location::manufactured(),
}
}
pub fn intern(self) -> ArcIntern<String> {