Fix loop condition and early return conversion (find/map) #62

Merged
merged 1 commit into from Sep 18, 2013

Conversation

Projects
None yet
2 participants
@dnadolny
Contributor

dnadolny commented Sep 17, 2013

The previous code only handled the case where the variable being looped over is used exactly once in a condition (converted to find) or an early return (converted to map). This handles all cases.
It's not the greatest since I'm creating a new class that extends NameExpr and has to be dealt with as a special case in ModifierVisitor, but there's no way to add new expressions without changing javaparser (and scala expressions/nodes shouldn't be in there).

@timowest

This comment has been minimized.

Show comment Hide comment
@timowest

timowest Sep 18, 2013

Owner

Could you update the content? There seem to be conflicts now.

Owner

timowest commented Sep 18, 2013

Could you update the content? There seem to be conflicts now.

@dnadolny

This comment has been minimized.

Show comment Hide comment
@dnadolny

dnadolny Sep 18, 2013

Contributor

Updated, it should merge cleanly now.

Contributor

dnadolny commented Sep 18, 2013

Updated, it should merge cleanly now.

timowest added a commit that referenced this pull request Sep 18, 2013

Merge pull request #62 from dnadolny/fix-loop
Fix loop condition and early return conversion (find/map)

@timowest timowest merged commit 7e59510 into timowest:master Sep 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment