-
Notifications
You must be signed in to change notification settings - Fork 0
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
Cleanup #1
Cleanup #1
Conversation
…om `master` as we can get away with
…formance improvements
This is an upstream port of decaffeinate#10 See that PR for links to the issues that this fixes. Just like OUTDENT and CALL_END tokens, close-curly-brace tokens can be generated without having a real location, and if that position overlaps with a later token, it can cause the AST to have bad location data. Just like the other two token types, we now give `}` tokens the position of the previous real token, which makes all AST nodes have reasonable locations.
…ated-close-curly-location Include generated } tokens when fixing closing token positions
if @value() is '!' | ||
poppedToken = @tokens.pop() | ||
id = '!' + id | ||
else if id is 'from' and @seenFor |
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.
Won't this break if tag
is 'PROPERTY'
?
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.
You should add a test for that :) This change didn't break any tests.
If it needs that check, I would just change this to else if tag is 'IDENTIFIER' and id is 'from' and @seenFor
…s.coffee; improve error message so that "own" is underlined
Addresses the lexer if block, general cleanup for style.
I’m leaving for you the task of moving the compilation error tests into
error_messages.coffee
.