Fix NamedExpr location

This commit is contained in:
harupy 2022-12-31 23:32:08 +09:00
parent e164a41723
commit d9bbeeb9b3
4 changed files with 10 additions and 10 deletions

View file

@ -767,10 +767,10 @@ NamedExpressionTest: ast::Expr = {
}
NamedExpression: ast::Expr = {
<location:@L> <id:Identifier> ":=" <value:Test<"all">> <end_location:@R> => {
<location:@L> <id:Identifier> <end_location:@R> ":=" <value:Test<"all">> => {
ast::Expr {
location,
end_location: Some(end_location),
end_location: value.end_location,
custom: (),
node: ast::ExprKind::NamedExpr {
target: Box::new(ast::Expr::new(