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

Comments are removed before checking for syntax errors, which include position information #7

Open
shenanigansd opened this issue Dec 5, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@shenanigansd
Copy link
Member

The syntax validation error messages will report incorrect positions because the comments are removed before the validation step runs, changing the length of the input.

bpp/src/bpp/interpreter.py

Lines 115 to 118 in ddfd7c9

def run(self: Self, code: str) -> None:
"""Run code."""
syntax = [tokenize(line) for line in code.split("\n")]
validate_syntax(syntax)

@shenanigansd shenanigansd added the bug Something isn't working label Dec 5, 2023
@shenanigansd shenanigansd self-assigned this Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant