Let located only for python located stuff

This commit is contained in:
Jeong YunWon 2023-05-10 03:17:56 +09:00
parent a3d9d8cb14
commit 1d366d52ab
7 changed files with 38 additions and 38 deletions

View file

@ -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(