pub fn span(&self) -> ByteSpan {
        match *self {
            Term::Parens(span, _)
            | Term::Universe(span, _)
            | Term::IntTypeSingleton(span, _)
            | Term::IntType(span, _, _)
            | Term::Extern(span, _, _)
            | Term::Array(span, _)
            | Term::Hole(span)
            | Term::If(span, _, _, _)
            | Term::Match(span, _, _)
            | Term::Refinement(span, _, _, _, _)
            | Term::Struct(span, _)
            | Term::Error(span) => span,
            Term::Name(start, ref name) => ByteSpan::from_offset(start, ByteOffset::from_str(name)),
            Term::Literal(ref literal) => literal.span(),
            Term::Pi(start, _, ref body) | Term::Lam(start, _, ref body) => {
                ByteSpan::new(start, body.span().end())
            },
            Term::Ann(ref term, ref ty) => term.span().to(ty.span()),
            Term::Arrow(ref ann, ref body) => ann.span().to(body.span()),
            Term::App(ref head, ref arg) => head.span().to(arg.last().unwrap().span()),
            Term::Proj(ref term, label_start, ref label) => term
                .span()
                .with_end(label_start + ByteOffset::from_str(label)),
        }
    }
/// Return the span of source code that this term originated from
Return the span of source code that this term originated from
Return the span of source code that this term originated from
pub fn span(&self) -> ByteSpan {
        match *self {
            Term::Parens(span, _)
            | Term::Universe(span, _)
            | Term::IntTypeSingleton(span, _)
            | Term::IntType(span, _, _)
            | Term::Extern(span, _, _)
            | Term::Array(span, _)
            | Term::Hole(span)
            | Term::If(span, _, _, _)
            | Term::Match(span, _, _)
            | Term::Refinement(span, _, _, _, _)
            | Term::Struct(span, _)
            | Term::Error(span) => span,
            Term::Name(start, ref name) => ByteSpan::from_offset(start, ByteOffset::from_str(name)),
            Term::Literal(ref literal) => literal.span(),
            Term::Pi(start, _, ref body) | Term::Lam(start, _, ref body) => {
                ByteSpan::new(start, body.span().end())
            },
            Term::Ann(ref term, ref ty) => term.span().to(ty.span()),
            Term::Arrow(ref ann, ref body) => ann.span().to(body.span()),
            Term::App(ref head, ref arg) => head.span().to(arg.last().unwrap().span()),
            Term::Proj(ref term, label_start, ref label) => term
                .span()
                .with_end(label_start + ByteOffset::from_str(label)),
        }
    }
pub fn span ( & self ) -> ByteSpan { match * self { Term :: Parens ( span , _ ) | Term :: Universe ( span , _ ) | Term :: IntTypeSingleton ( span , _ ) | Term :: IntType ( span , _ , _ ) | Term :: Extern ( span , _ , _ ) | Term :: Array ( span , _ ) | Term :: Hole ( span ) | Term :: If ( span , _ , _ , _ ) | Term :: Match ( span , _ , _ ) | Term :: Refinement ( span , _ , _ , _ , _ ) | Term :: Struct ( span , _ ) | Term :: Error ( span ) => span , Term :: Name ( start , ref name ) => ByteSpan :: from_offset ( start , ByteOffset :: from_str ( name ) ) , Term :: Literal ( ref literal ) => literal . span ( ) , Term :: Pi ( start , _ , ref body ) | Term :: Lam ( start , _ , ref body ) => { ByteSpan :: new ( start , body . span ( ) . end ( ) ) } , Term :: Ann ( ref term , ref ty ) => term . span ( ) . to ( ty . span ( ) ) , Term :: Arrow ( ref ann , ref body ) => ann . span ( ) . to ( body . span ( ) ) , Term :: App ( ref head , ref arg ) => head . span ( ) . to ( arg . last ( ) . unwrap ( ) . span ( ) ) , Term :: Proj ( ref term , label_start , ref label ) => term . span ( ) . with_end ( label_start + ByteOffset :: from_str ( label ) ) , } }
Return the span of source code that this term originated from
Return the span of source code that this term originated from
&self
&self