tamer: asg::air::Air::span: Provide spans
Not that they're loaded from object files yet, but this will at least work once they are. DEV-13160main
parent
8e328d2828
commit
4b9b173e30
|
@ -139,9 +139,20 @@ impl Token for Air {
|
|||
}
|
||||
|
||||
fn span(&self) -> crate::span::Span {
|
||||
// TODO: This can be provided once the xmlo files store source
|
||||
// locations for symbols.
|
||||
UNKNOWN_SPAN
|
||||
use Air::*;
|
||||
|
||||
match self {
|
||||
Todo => UNKNOWN_SPAN,
|
||||
|
||||
OpenExpr(_, span) | CloseExpr(span) => *span,
|
||||
|
||||
IdentExpr(spair)
|
||||
| IdentDecl(spair, _, _)
|
||||
| IdentExternDecl(spair, _, _)
|
||||
| IdentDep(spair, _)
|
||||
| IdentFragment(spair, _)
|
||||
| IdentRoot(spair) => spair.span(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue