mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-30 23:27:39 +00:00
Let located
only for python located stuff
This commit is contained in:
parent
a3d9d8cb14
commit
1d366d52ab
7 changed files with 38 additions and 38 deletions
|
@ -6,7 +6,7 @@
|
|||
use crate::{
|
||||
ast::{self, Constant, Expr, ExprKind},
|
||||
lexer::{LexicalError, LexicalErrorType},
|
||||
parser::{parse_expression_located, LalrpopError, ParseError, ParseErrorType},
|
||||
parser::{parse_expression_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_located(&fstring_body, "<fstring>", start)
|
||||
parse_expression_at(&fstring_body, "<fstring>", start)
|
||||
}
|
||||
|
||||
fn parse_string(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue