Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed for visitors when node.init is a FunctionCall

  • Loading branch information...
commit 3832095b90012488209a9d5097ade9c22937205e 1 parent 71f4940
@duilio duilio authored
View
2  src/slimit/visitors/ecmavisitor.py
@@ -107,7 +107,7 @@ def visit_For(self, node):
s += self.visit(node.init)
if node.init is None:
s += ' ; '
- elif isinstance(node.init, (ast.Assign, ast.Comma)):
+ elif isinstance(node.init, (ast.Assign, ast.Comma, ast.FunctionCall)):
s += '; '
else:
s += ' '
View
3  src/slimit/visitors/minvisitor.py
@@ -140,7 +140,8 @@ def visit_For(self, node):
s += self.visit(node.init)
if node.init is None:
s += ';'
- elif isinstance(node.init, (ast.Assign, ast.Comma, ast.Conditional)):
+ elif isinstance(node.init, (ast.Assign, ast.Comma, ast.Conditional,
+ ast.FunctionCall)):
s += ';'
else:
s += ''
Please sign in to comment.
Something went wrong with that request. Please try again.