Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Bindgen
pystencils
Commits
f0223a06
Commit
f0223a06
authored
Dec 03, 2017
by
Martin Bauer
Browse files
Bugfixes
parent
e6c3f509
Changes
1
Hide whitespace changes
Inline
Side-by-side
astnodes.py
View file @
f0223a06
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment