From de20b7df8925296f69aefb5b55a6356055c1a016 Mon Sep 17 00:00:00 2001 From: David Raleigh Date: Fri, 15 Apr 2016 13:02:22 -0700 Subject: [PATCH 1/3] ignoring pycharm idea stuff --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2130e0d..42ae785 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.class *.egg-info *.pyc +.idea/ +build/ \ No newline at end of file From 8ccdc5045dd18d70ddd19e1fc253daf55e592eb0 Mon Sep 17 00:00:00 2001 From: David Raleigh Date: Fri, 15 Apr 2016 13:04:36 -0700 Subject: [PATCH 2/3] fixes issue 25 as per spacelis suggestion --- java2python/compiler/visitor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java2python/compiler/visitor.py b/java2python/compiler/visitor.py index f62e53e..9984767 100644 --- a/java2python/compiler/visitor.py +++ b/java2python/compiler/visitor.py @@ -452,7 +452,8 @@ def acceptFor(self, node, memo): else: whileStat.expr.walk(cond, memo) whileBlock = self.factory.methodContent(parent=self) - if not node.firstChildOfType(tokens.BLOCK_SCOPE).children: + # issue 25 fix : https://github.com/natural/java2python/issues/25 + if node.firstChildOfType(tokens.BLOCK_SCOPE) and not node.firstChildOfType(tokens.BLOCK_SCOPE).children: self.factory.expr(left='pass', parent=whileBlock) else: whileBlock.walk(node.firstChildOfType(tokens.BLOCK_SCOPE), memo) From f953c3fc18476fd276c1f521e58fd4ec63dbca62 Mon Sep 17 00:00:00 2001 From: David Raleigh Date: Fri, 15 Apr 2016 13:09:16 -0700 Subject: [PATCH 3/3] fixed file ending --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 42ae785..0bc28d0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ *.egg-info *.pyc .idea/ -build/ \ No newline at end of file +build/