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 at the end of file don't work #5

Open
tusharsadhwani opened this issue Aug 16, 2023 · 1 comment
Open

Comments at the end of file don't work #5

tusharsadhwani opened this issue Aug 16, 2023 · 1 comment
Labels

Comments

@tusharsadhwani
Copy link
Owner

The current tokenizer has a flaw that it crashes if a file ends with a comment.

@Agent-Hellboy
Copy link

Hi @tusharsadhwani
It crashes when a newline is found after a comment, I am not able to figure out why it is not failing into this loop of skipping tokens.

self.skip_token()

elif char in "\f\v\t\r\n ":

should we need an EOL token and later a branch to parse that?

def parse_literal(self) -> Expression:

By the way, Is there a write-up about how this works? I will try to come up with a write-up and you can review

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

No branches or pull requests

2 participants