mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Bump rustc-ap-rustc_lexer
This commit is contained in:
parent
f03fb262f7
commit
4788c7a056
4 changed files with 9 additions and 4 deletions
|
@ -82,6 +82,7 @@ impl<'a> LexedStr<'a> {
|
|||
pub fn text(&self, i: usize) -> &str {
|
||||
self.range_text(i..i + 1)
|
||||
}
|
||||
|
||||
pub fn range_text(&self, r: ops::Range<usize>) -> &str {
|
||||
assert!(r.start < r.end && r.end <= self.len());
|
||||
let lo = self.start[r.start] as usize;
|
||||
|
@ -216,6 +217,10 @@ impl<'a> Converter<'a> {
|
|||
rustc_lexer::TokenKind::Caret => T![^],
|
||||
rustc_lexer::TokenKind::Percent => T![%],
|
||||
rustc_lexer::TokenKind::Unknown => ERROR,
|
||||
rustc_lexer::TokenKind::UnknownPrefix => {
|
||||
err = "unknown literal prefix";
|
||||
IDENT
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue