Commit f0223a06 authored by Martin Bauer's avatar Martin Bauer
Browse files

Bugfixes

parent e6c3f509
......@@ -268,8 +268,12 @@ class Block(Node):
# move all assignment (definitions to the top)
if isinstance(newNode, SympyAssignment) and newNode.isDeclaration:
while idx > 0 and not (isinstance(self._nodes[idx-1], SympyAssignment) and self._nodes[idx-1].isDeclaration):
idx -= 1
while idx > 0:
pn = self._nodes[idx - 1]
if isinstance(pn, LoopOverCoordinate) or isinstance(pn, Conditional):
idx -= 1
else:
break
self._nodes.insert(idx, newNode)
def append(self, node):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment