mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-30 15:18:02 +00:00
parse_expression{=>_starts}_at
This commit is contained in:
parent
aa101e4f26
commit
822cac5aa0
3 changed files with 8 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
use crate::{
|
||||
ast::{self, Constant, Expr, ExprKind, Int},
|
||||
lexer::{LexicalError, LexicalErrorType},
|
||||
parser::{parse_expression_at, LalrpopError, ParseError, ParseErrorType},
|
||||
parser::{parse_expression_starts_at, LalrpopError, ParseError, ParseErrorType},
|
||||
token::{StringKind, Tok},
|
||||
};
|
||||
use itertools::Itertools;
|
||||
|
@ -575,7 +575,7 @@ impl<'a> StringParser<'a> {
|
|||
fn parse_fstring_expr(source: &str, location: TextSize) -> Result<Expr, ParseError> {
|
||||
let fstring_body = format!("({source})");
|
||||
let start = location - TextSize::from(1);
|
||||
parse_expression_at(&fstring_body, "<fstring>", start)
|
||||
parse_expression_starts_at(&fstring_body, "<fstring>", start)
|
||||
}
|
||||
|
||||
fn parse_string(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue