mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
⬆️ rust-analyzer
This commit is contained in:
parent
3e0e51c108
commit
bc45c7659a
321 changed files with 11210 additions and 9720 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