mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-21 12:05:27 +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,16 +207,14 @@ impl<'a> FStringParser<'a> {
|
||||||
'"' | '\'' => {
|
'"' | '\'' => {
|
||||||
expression.push(ch);
|
expression.push(ch);
|
||||||
loop {
|
loop {
|
||||||
match self.next_char() {
|
let Some(c) = self.next_char() else {
|
||||||
Some(c) => {
|
return Err(UnterminatedString);
|
||||||
|
};
|
||||||
expression.push(c);
|
expression.push(c);
|
||||||
if c == ch {
|
if c == ch {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => return Err(UnterminatedString),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
' ' if self_documenting => {
|
' ' if self_documenting => {
|
||||||
trailing_seq.push(ch);
|
trailing_seq.push(ch);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue