Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix test "tests/functions/and.py" and others that were failing becaus…

…e visit_AssignSimple added "var " to module references
  • Loading branch information...
commit 126b10aa4f7ccbb28c661af8509f9a2640cdf2d5 1 parent b164451
@thenewguy authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  pyjaco/compiler/python.py
View
3  pyjaco/compiler/python.py
@@ -293,7 +293,8 @@ def visit_AssignSimple(self, target, value):
if isinstance(target, ast.Name):
if not var in self._global_identifiers and not var in self._vars:
self._vars.append(var)
- declare = "var "
+ if not self.module or not var.startswith(self.module_ref):
+ declare = "var "
js.append("%s%s = %s.PY$__getitem__(%d);" % (declare, var, dummy, i))
elif isinstance(target, ast.Subscript) and isinstance(target.slice, ast.Index):
# found index assignment
Please sign in to comment.
Something went wrong with that request. Please try again.