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
8a8a9cc2
Commit
8a8a9cc2
authored
Nov 13, 2016
by
Maxime Perrotin
Browse files
Fix reporting of coordinates in "for loop" warnings
parent
7fb91f44
Changes
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
8a8a9cc2
...
...
@@ -142,6 +142,9 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
1.
5.20 (11/2016)
-
Fix wrongly formatted error reporting in FOR loops
1.
5.19 (11/2016)
-
Fix integer cast in Ada
...
...
opengeode/ogParser.py
View file @
8a8a9cc2
...
...
@@ -2016,7 +2016,7 @@ def composite_state(root, parent=None, context=None):
LOG
.
debug
(
'Procedure context is undefined'
)
inner_proc
=
[]
# Gather the list of states defined in the composite state
# and map a list of transitions
i
to each state
# and map a list of transitions to each state
comp
.
mapping
=
{
name
:
[]
for
name
in
get_state_list
(
root
)}
inner_composite
,
states
,
floatings
,
starts
=
[],
[],
[],
[]
for
child
in
root
.
getChildren
():
...
...
@@ -4233,8 +4233,12 @@ def for_loop(root, context):
forloop
[
'transition'
],
err
,
warn
=
transition
(
child
,
parent
=
for_loop
,
context
=
context
)
errors
.
extend
(
err
)
warnings
.
extend
(
warn
)
# if the transition contains tasks or other constructs that are
# normally inside a graphical symbol, the errors and warnings will
# contain coordinates. Remove them, they will be replaced by those
# of the TASK symbol that contains the for loop
errors
.
extend
(
e
[
0
]
if
type
(
e
)
is
list
else
e
for
e
in
err
)
warnings
.
extend
(
w
[
0
]
if
type
(
w
)
is
list
else
w
for
w
in
warn
)
else
:
warnings
.
append
(
'Unsupported child type in FOR body'
+
str
(
child
.
type
))
...
...
opengeode/opengeode.py
View file @
8a8a9cc2
...
...
@@ -138,7 +138,7 @@ except ImportError:
__all__
=
[
'opengeode'
,
'SDL_Scene'
,
'SDL_View'
,
'parse'
]
__version__
=
'1.5.
19
'
__version__
=
'1.5.
20
'
if
hasattr
(
sys
,
'frozen'
):
# Detect if we are running on Windows (py2exe-generated)
...
...
tests/regression/test-recursion/og.pr
View file @
8a8a9cc2
...
...
@@ -99,7 +99,7 @@ my_tree(h) := {{cost 5, son g}};
CALL findpath(a, g, my_tree, res);
/* CIF PROCEDURECALL (89, 474), (201, 35) */
CALL writeln('best cost:', res!cost);
/* CIF NEXTSTATE (155, 52
4
), (70, 35) */
/* CIF NEXTSTATE (155, 52
9
), (70, 35) */
NEXTSTATE wait;
/* CIF STATE (296, 231), (70, 35) */
STATE wait;
...
...
Write
Preview
Supports
Markdown
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