Skip to content

Handle redefinable operators as identifier #470

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

Merged
merged 3 commits into from
Aug 8, 2017

Conversation

aycabta
Copy link
Member

@aycabta aycabta commented Jul 24, 2017

For example, operators is highlighting as a operator, but redefineable operators as method is highlighting as a method in GitHub:

def sample_method
end

def +(a, b) # this method name is the same color of above
  a + b # this operator is defferent color from method
end

This Pull Request is fixes the behavior.

When @lex_state is :EXPR_FNAME or :EXPR_DOT, the token is method name. So This Pull Request handles redefineable operators as TkId (identifier) in the case.

@aycabta aycabta force-pushed the handle-redefinable-operators branch from 313c726 to e45f7cd Compare July 29, 2017 00:18
@hsbt hsbt self-assigned this Aug 5, 2017
@hsbt
Copy link
Member

hsbt commented Aug 8, 2017

Thanks for an additional unit test. It is reasonable change.

@hsbt hsbt merged commit daf4867 into ruby:master Aug 8, 2017
@aycabta aycabta deleted the handle-redefinable-operators branch August 8, 2017 11:58
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.

2 participants