mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
support literal suffixes
This commit is contained in:
parent
73ded3c63c
commit
359e70d1b2
7 changed files with 40 additions and 2 deletions
|
@ -93,6 +93,7 @@ pub enum SyntaxErrorKind {
|
|||
OverlongUnicodeEscape,
|
||||
UnicodeEscapeOutOfRange,
|
||||
UnclosedString,
|
||||
InvalidSuffix,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
|
@ -134,6 +135,7 @@ impl fmt::Display for SyntaxErrorKind {
|
|||
}
|
||||
UnicodeEscapeOutOfRange => write!(f, "Unicode escape code should be at most 0x10FFFF"),
|
||||
UnclosedString => write!(f, "Unclosed string literal"),
|
||||
InvalidSuffix => write!(f, "Invalid literal suffix"),
|
||||
ParseError(msg) => write!(f, "{}", msg.0),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue