Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure the position information in AST nodes created by the parser is always consistent #93351

Closed
pablogsal opened this issue May 30, 2022 · 0 comments · Fixed by #93352
Closed

Ensure the position information in AST nodes created by the parser is always consistent #93351

pablogsal opened this issue May 30, 2022 · 0 comments · Fixed by #93352
Labels
3.10 3.11 3.12 interpreter-core

Comments

@pablogsal
Copy link
Member

@pablogsal pablogsal commented May 30, 2022

If we create an AST node with invalid position information, the error is reported in the compiler when it validates the line numbers and end line numbers, which is too far away and debugging this can be quite challenging. To improve the debugging experience, ensure that the parser cannot create an AST node with invalid position information.

pablogsal added a commit to pablogsal/cpython that referenced this issue May 30, 2022
@AA-Turner AA-Turner added interpreter-core 3.11 3.10 3.12 labels May 30, 2022
pablogsal added a commit to pablogsal/cpython that referenced this issue May 30, 2022
pablogsal added a commit to pablogsal/cpython that referenced this issue May 30, 2022
pablogsal added a commit to pablogsal/cpython that referenced this issue May 30, 2022
pablogsal added a commit to pablogsal/cpython that referenced this issue May 30, 2022
pablogsal added a commit to pablogsal/cpython that referenced this issue May 30, 2022
pablogsal added a commit that referenced this issue May 30, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 30, 2022
…by the parser is always consistent (pythonGH-93352)

(cherry picked from commit 5893b5d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
miss-islington added a commit that referenced this issue May 30, 2022
… parser is always consistent (GH-93352)

(cherry picked from commit 5893b5d)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 3.11 3.12 interpreter-core
Projects
None yet
2 participants