Remove unused functions

This commit is contained in:
Joscha 2022-11-22 17:39:56 +01:00
parent f8fa044259
commit 39099037a5
4 changed files with 0 additions and 52 deletions

View file

@ -39,17 +39,6 @@ impl Space {
span,
}
}
pub fn then(mut self, other: Self) -> Self {
self.lines.extend(other.lines);
self.span = self.span.join(other.span);
self
}
pub fn then_line(mut self, line: Line) -> Self {
self.lines.push(line);
self
}
}
#[derive(Clone)]

View file

@ -94,29 +94,6 @@ impl Field {
}
}
pub fn access_ident(base: Box<Expr>, ident: Ident, span: Span) -> Self {
Self::AccessIdent {
expr: base,
s0: Space::empty(span),
s1: Space::empty(span),
ident,
span,
}
}
pub fn assign_ident(base: Box<Expr>, ident: Ident, value: Box<Expr>, span: Span) -> Self {
Self::AssignIdent {
expr: base,
s0: Space::empty(span),
s1: Space::empty(span),
ident,
s2: Space::empty(span),
s3: Space::empty(span),
value,
span,
}
}
pub fn expr(self) -> Expr {
Expr::Field(self)
}

View file

@ -53,12 +53,6 @@ impl HasSpan for NumLit {
}
}
impl NumLit {
pub fn lit(self) -> Lit {
Lit::Num(self)
}
}
#[derive(Clone)]
pub enum StringLitElem {
/// Normal unescaped characters

View file

@ -38,18 +38,6 @@ impl TableConstrElem {
pub fn named(name: Ident, value: Box<Expr>, span: Span) -> Self {
Self::Lit(TableLitElem::named(name, value, span))
}
pub fn indexed(index: Box<Expr>, value: Box<Expr>, span: Span) -> Self {
Self::Indexed {
s0: Space::empty(span),
index,
s1: Space::empty(span),
s2: Space::empty(span),
s3: Space::empty(span),
value,
span,
}
}
}
/// `{ a, b, foo: c, [d]: e }`