Repository navigation
Less paranthesis - #195
Less paranthesis#195
Conversation
* Add precedence in IGenerable JOp has enum Precedence. First one has higher priority. IGenerable defaults to TOKEN precedence. unary, binary, ternary operator have that value replaced with the one of their operator. Cast, array comp redefine that value with their own precedence. FormatterSetting has option for parentheses.operator : - ALWAYS to add all the parenthesis we can - NONTOKEN to only skip token parts - REQUIRED to only parenthesis around element with lower precedence Previously mentioned elements use that value to add () when needed. This is formatting, yet some behavior should be the same in the end whatever formatting we choose : there are test classes to obv. showcase and track the changes, but also actually test the behavior. * added example module to have settings defaults * spreading tests and use functional interface. * wording, RuntimeException->UncheckedIoException * jfor javadoc, more parentheses tests * parentheses settings rename from "operators" to "global" --------- Co-authored-by: glelouet <n@mo>
|
@phax that's annoying. There was several comments
|
|
@glelouet please recheck master |
|
@phax lgtm Though What I said was actually wrong, I need to make a few tests. |
|
So I am on vacation and most likely can't do a release built in-between.... |
|
That gives me some time for the next PR … :evil_face: |
|
Evil face does not render on GitHub - sorry ;-) |
|
Btw for that feature I really recommend test driven development - there are so many permutations |
|
nah, it's actually just a bit of code. But please give your advice in the corresponding PR :-D :very_evil_face: |
|
@glelouet do you intent to do anything additional on this matter? |
|
@phax ? No ? |
|
good :) |
|
For the record - there was already a followup in #197 |
|
Yes, that was fixing a specific issue, I looked at the code and there was too many changes to I trust you instead. |
As the follow-up on #183