MCPcopy Create free account
hub / github.com/agenticsorg/lean-agentic / span

Method span

leanr-syntax/src/ast.rs:207–223  ·  view source on GitHub ↗

Get the span of this expression

(&self)

Source from the content-addressed store, hash-verified

205impl Expr {
206 /// Get the span of this expression
207 pub fn span(&self) -> Span {
208 match self {
209 Expr::Ident(i) => i.span,
210 Expr::Lit(l) => l.span,
211 Expr::App { span, .. } => *span,
212 Expr::Lam { span, .. } => *span,
213 Expr::Forall { span, .. } => *span,
214 Expr::Arrow { span, .. } => *span,
215 Expr::Let { span, .. } => *span,
216 Expr::Match { span, .. } => *span,
217 Expr::If { span, .. } => *span,
218 Expr::Ann { span, .. } => *span,
219 Expr::Hole { span } => *span,
220 Expr::Universe { span, .. } => *span,
221 Expr::Paren { span, .. } => *span,
222 }
223 }
224}
225
226/// Literal expression

Callers 13

checkMethod · 0.80
parse_defMethod · 0.80
parse_theoremMethod · 0.80
parse_axiomMethod · 0.80
parse_constructorMethod · 0.80
parse_structureMethod · 0.80
parse_arrow_exprMethod · 0.80
parse_forall_exprMethod · 0.80
parse_lambda_exprMethod · 0.80
parse_let_exprMethod · 0.80
parse_match_exprMethod · 0.80
parse_app_exprMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected