-
Notifications
You must be signed in to change notification settings - Fork 4
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
Operator Precedence Atom Finder #16
Conversation
This PR doesn't look like it actually changes the atom at all? Is that right? Also, why are the tests failing? Otherwise all the code looks fine. Obviously the stuff in redundant-parens.clj is a little messier, but that's your space to do with however you want. |
@@ -78,7 +78,9 @@ | |||
(order-insensitive-opt-combination (sort combination)) | |||
|
|||
;;SPECIAL CASE 1: Comma operator in any combination; | |||
(some (partial = :comma) combination))) | |||
(some (partial = :comma) combination) | |||
;SPECIAL CASE 2: note that the pair name is not [:bitwise_bin :bitwise-bin] |
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.
I'm glad you put a comment here, but what does it mean. What's the difference between bitwise_bin, bitwise-bin, and bitwise--bin?
(and (and (= :bitwise_bin node-group) | ||
(= :bitwise_bin (safe-nth child-groups 1))) | ||
(not (= (.getOperator node) (.getOperator (safe-nth child-nodes 1))))) | ||
[[:bitwise--bin :bitwise--bin]] |
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.
Ok, now I understand, but its still confusing. What about renaming these to like
[[:non-matching-bitwise :non-matching-bitwise]]
or, since it's impossible to ever have only one appear alone, maybe just
[[:non-matching-bitwise]]
or something?
I'm merging this because it looks like a good fix, but still please consider addressing the comments. |
Hopefully all is well?