Merge pull request #2184 from jkmar/return_result_in_visitor
[Python3] return result instead of None in visitor
This commit is contained in:
commit
4cca8cd68d
|
@ -178,3 +178,4 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2017/12/01, DavidMoraisFerreira, David Morais Ferreira, david.moraisferreira@gmail.com
|
||||
2017/12/01, SebastianLng, Sebastian Lang, sebastian.lang@outlook.com
|
||||
2017/12/03, oranoran, Oran Epelbaum, oran / epelbaum me
|
||||
2017/12/27, jkmar, Jakub Marciniszyn, marciniszyn.jk@gmail.com
|
||||
|
|
|
@ -40,7 +40,7 @@ class ParseTreeVisitor(object):
|
|||
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)
|
||||
|
|
|
@ -38,7 +38,7 @@ class ParseTreeVisitor(object):
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue