mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-18 18:45:23 +00:00
Fix FormattedValue location
This commit is contained in:
parent
4e00ba2c50
commit
faec9372f9
22 changed files with 2195 additions and 355 deletions
|
@ -90,6 +90,15 @@ pub enum FStringErrorType {
|
|||
UnterminatedString,
|
||||
}
|
||||
|
||||
impl FStringErrorType {
|
||||
pub fn to_lexical_error(self, location: Location) -> LexicalError {
|
||||
LexicalError {
|
||||
error: LexicalErrorType::FStringError(self),
|
||||
location,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for FStringErrorType {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue