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

Dont swallow bad input while parsing spaces #6054

Merged
merged 2 commits into from
Nov 22, 2023
Merged

Conversation

jecaro
Copy link
Contributor

@jecaro jecaro commented Nov 21, 2023

Fix #5939

The problem in this input is not the presence of Unicode characters. It is the presence of a tab character (the larger space in the comment). Remove only that character and roc is happy to run the test without any trouble.

Anyway, the tab error is rightly identified by the parser but was swallowed and converted to EExpr::DefMissingFinalExpr, leading to that confusing error. Keeping it makes roc print the right error.

Copy link
Contributor

@rtfeldman rtfeldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh great catch @jecaro! Thank you so much for fixing this! 😍

@rtfeldman rtfeldman merged commit 87a0b54 into roc-lang:main Nov 22, 2023
14 checks passed
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

Successfully merging this pull request may close these issues.

Parser bug with unicode characters in comment
2 participants