Skip to content

Commit

Permalink
Merge pull request #2184 from jkmar/return_result_in_visitor
Browse files Browse the repository at this point in the history
[Python3] return result instead of None in visitor
  • Loading branch information
parrt authored Jan 1, 2018
2 parents 74779f3 + 6326725 commit 4cca8cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,4 @@ YYYY/MM/DD, github id, Full name, email
2017/12/01, DavidMoraisFerreira, David Morais Ferreira, [email protected]
2017/12/01, SebastianLng, Sebastian Lang, [email protected]
2017/12/03, oranoran, Oran Epelbaum, oran / epelbaum me
2017/12/27, jkmar, Jakub Marciniszyn, [email protected]
2 changes: 1 addition & 1 deletion runtime/Python2/src/antlr4/tree/Tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def visitChildren(self, node):
n = node.getChildCount()
for i in range(n):
if not self.shouldVisitNextChild(node, result):
return
return result

c = node.getChild(i)
childResult = c.accept(self)
Expand Down
2 changes: 1 addition & 1 deletion runtime/Python3/src/antlr4/tree/Tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def visitChildren(self, node):
n = node.getChildCount()
for i in range(n):
if not self.shouldVisitNextChild(node, result):
return
return result

c = node.getChild(i)
childResult = c.accept(self)
Expand Down

0 comments on commit 4cca8cd

Please sign in to comment.