mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-20 11:35:20 +00:00
Update compiler/parser/src/fstring.rs
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
This commit is contained in:
parent
7e8f683808
commit
b707f53f23
1 changed files with 6 additions and 8 deletions
|
@ -207,14 +207,12 @@ impl<'a> FStringParser<'a> {
|
|||
'"' | '\'' => {
|
||||
expression.push(ch);
|
||||
loop {
|
||||
match self.next_char() {
|
||||
Some(c) => {
|
||||
expression.push(c);
|
||||
if c == ch {
|
||||
break;
|
||||
}
|
||||
}
|
||||
None => return Err(UnterminatedString),
|
||||
let Some(c) = self.next_char() else {
|
||||
return Err(UnterminatedString);
|
||||
};
|
||||
expression.push(c);
|
||||
if c == ch {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue