mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Fix lifetime in tt to syntax node conversion
This commit is contained in:
parent
ee94edc722
commit
da05bbcfb1
1 changed files with 6 additions and 1 deletions
|
@ -429,7 +429,12 @@ fn convert_literal(l: &tt::Literal) -> TtToken {
|
|||
}
|
||||
|
||||
fn convert_ident(ident: &tt::Ident) -> TtToken {
|
||||
let kind = SyntaxKind::from_keyword(ident.text.as_str()).unwrap_or(IDENT);
|
||||
let kind = if let Some('\'') = ident.text.chars().next() {
|
||||
LIFETIME
|
||||
} else {
|
||||
SyntaxKind::from_keyword(ident.text.as_str()).unwrap_or(IDENT)
|
||||
};
|
||||
|
||||
TtToken { kind, is_joint_to_next: false, text: ident.text.clone(), n_tokens: 1 }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue