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 assignment operator consuming comparison operators #114
Conversation
| @@ -1216,6 +1212,10 @@ | |||
| 'name': 'keyword.operator.comparison.php' | |||
| } | |||
| { | |||
| 'match': '=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=' | |||
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.
While you're at it, it looks like = should be matched last in this pattern.
|
Looks like some specs broke - could you please take a look at that? Thanks! |
|
I did not know that you had a spec, since |
| 'match': '=|\\+=|\\-=|\\*=|/=|%=|&=|\\|=|\\^=|<<=|>>=' | ||
| 'name': 'keyword.operator.assignment.php' | ||
| } | ||
| { | ||
| 'match': '(<=|>=|<|>)' | ||
| 'name': 'keyword.operator.comparison.php' |
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.
Why can't the two comparison matches be combined into one?
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.
Because <<= needs to match before <=, but === needs to match before =.
If there's a way to do that with no two comparison matches, great.
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.
Hmm, that is tricky. Let's just leave it as-is then :).
Try |
|
One last question before I merge: is |
|
Added a spec for that - apparently, no. I am not exactly sure, why. |
Fix assignment operator consuming comparison operators
|
|
Fixes #61 Fixes #62 Fixes #63 see atom/language-php#114 See atom/language-php@3cd6b46


===is currently being treated as three assignment operators.