Refactor how spans are combined in the parser.

This commit is contained in:
Jeffrey Seyfried
2017-03-15 00:22:48 +00:00
parent ec7c0aece1
commit f08d5ad4c5
22 changed files with 363 additions and 438 deletions

View File

@@ -49,10 +49,6 @@ pub struct Spanned<T> {
pub span: Span,
}
pub fn spanned<T>(lo: BytePos, hi: BytePos, t: T) -> Spanned<T> {
respan(mk_sp(lo, hi), t)
}
pub fn respan<T>(sp: Span, t: T) -> Spanned<T> {
Spanned {node: t, span: sp}
}