Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit71becd4

Browse files
authored
Merge pull requestRustPython#4391 from harupy/fix-NamedExpr-location
Fix `NamedExpr` location
2 parentsaff07cf +49b9f49 commit71becd4

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

‎compiler/parser/python.lalrpop‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,10 @@ NamedExpressionTest: ast::Expr = {
767767
}
768768

769769
NamedExpression: ast::Expr = {
770-
<location:@L> <id:Identifier> ":=" <value:Test<"all">> <end_location:@R> => {
770+
<location:@L> <id:Identifier><end_location:@R>":=" <value:Test<"all">> => {
771771
ast::Expr {
772772
location,
773-
end_location:Some(end_location),
773+
end_location:value.end_location,
774774
custom: (),
775775
node: ast::ExprKind::NamedExpr {
776776
target: Box::new(ast::Expr::new(

‎compiler/parser/src/snapshots/rustpython_parser__context__tests__assign_named_expr.snap‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎compiler/parser/src/snapshots/rustpython_parser__parser__tests__parse_named_expression_generator_comprehension.snap‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎compiler/parser/src/snapshots/rustpython_parser__with__tests__with_statement.snap‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp