8000 bug: syntax error if python code ends with line comment · Issue #25 · lezer-parser/python · GitHub
[go: up one dir, main page]

Skip to content

bug: syntax error if python code ends with line comment #25

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.

8000

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

Closed
Entkenntnis opened this issue Jun 25, 2024 · 1 comment
Closed

bug: syntax error if python code ends with line comment #25

Entkenntnis opened this issue Jun 25, 2024 · 1 comment

Comments

@Entkenntnis
Copy link
Entkenntnis commented Jun 25, 2024

I'm attempting to parse this code:

grafik

Unexpectedly, there is a syntax error at the end of the document. The AST looks like this:

grafik

If I add a new line, the code becomes valid:

grafik

version: lezer-parser/python 1.1.14

@marijnh
Copy link
Contributor
marijnh commented Jun 25, 2024

Attached patch should address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0