-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix including trivia in check for typeof identifier #317
Fix including trivia in check for typeof identifier #317
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test case for this?
full-moon/tests/roblox_cases/pass/multiline_typeof_regression/ast.snap
Outdated
Show resolved
Hide resolved
@JohnnyMorganz The tests should be all good now, I had forgot to update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a one line change, shouldn't be bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes #314
The following case will fail to parse correctly because the check at this line includes all trivia. When including the trivia, we end up with a check that looks like
" typeof" = "typeof"
, which of course fails.This PR turns the token into a string instead of the token reference in the check, as the token does not contain trivia.