Desugar function calls with argument

This commit is contained in:
Joscha 2022-11-21 13:27:07 +01:00
parent 7bfaebc05f
commit 5c8dd1969f
2 changed files with 64 additions and 11 deletions

View file

@ -45,6 +45,15 @@ pub struct Ident {
pub span: Span,
}
impl Ident {
pub fn new<S: ToString>(name: S, span: Span) -> Self {
Self {
name: name.to_string(),
span,
}
}
}
impl fmt::Debug for Ident {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "i#{}", self.name)