parse lifetimes
This commit is contained in:
parent
53fc09c02f
commit
47f4c1e8c2
6 changed files with 402 additions and 12 deletions
|
|
@ -14,6 +14,8 @@ pub enum SpanKind {
|
|||
Number,
|
||||
/// Known literals, like `true`, `false`, `None`, `Ok`, `Err`
|
||||
Literal,
|
||||
/// Lifetimes (`'foo`)
|
||||
Lifetime,
|
||||
/// Strings
|
||||
String,
|
||||
/// Paths
|
||||
|
|
@ -193,6 +195,10 @@ mod private {
|
|||
Token::Atom(atom) => {
|
||||
atom.into_spans(cx);
|
||||
}
|
||||
Token::Lifetime(lifetime) => {
|
||||
cx.push("'", SpanKind::Surroundings);
|
||||
cx.push(lifetime, SpanKind::Lifetime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue