Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
a8d54281
Commit
a8d54281
authored
Nov 23, 2015
by
Maxime Perrotin
Browse files
Fix buggy recursive calls in global syntax checks
parent
2a038e00
Changes
2
Show whitespace changes
Inline
Side-by-side
design/howto
View file @
a8d54281
...
...
@@ -275,6 +275,6 @@ def _continuous_signal(symbol, recursive=True, **kwargs):
return result
As in 7), also make sure that the parent symbol (here: state) can recursively
parse the new child
ren
.
parse the new child.
opengeode/opengeode.py
View file @
a8d54281
...
...
@@ -697,10 +697,15 @@ class SDL_Scene(QtGui.QGraphicsScene, object):
msg_box
.
exec_
()
def
global_syntax_check
(
self
):
def
global_syntax_check
(
self
,
ignore
=
set
()
):
''' Parse each visible symbol in the current scene and its children
and check syntax using the parser '''
and check syntax using the parser
Use a mutable parameter to avoid recursion on already visited
scenes
'''
res
=
True
reset
=
not
ignore
ignore
.
add
(
self
)
for
each
in
self
.
visible_symb
:
errors
=
self
.
syntax_errors
(
each
)
if
errors
:
...
...
@@ -720,9 +725,11 @@ class SDL_Scene(QtGui.QGraphicsScene, object):
log_errors
(
self
.
messages_window
,
fmt
,
[],
clearfirst
=
False
)
for
each
in
self
.
all_nested_scenes
:
err
=
each
.
global_syntax_check
()
if
not
e
rr
:
if
each
not
in
ignore
:
if
not
e
ach
.
global_syntax_check
()
:
res
=
False
if
reset
:
ignore
.
clear
()
return
res
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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