Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
cb84b06f
Commit
cb84b06f
authored
Apr 18, 2021
by
Maxime Perrotin
Browse files
Fix bugs in observers
parent
9e2326d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/ogParser.py
View file @
cb84b06f
...
...
@@ -1658,23 +1658,22 @@ def io_expression(root, context):
string
+=
event_kind
.
format
(
kind
=
kind
)
param_name
=
""
func
=
""
for
child
in
root
.
getChildren
():
if
child
.
type
==
lexer
.
ID
:
msg
=
child
.
text
elif
child
.
type
==
lexer
.
FROM
:
f
unc
=
child
.
getChild
(
0
).
text
f
rom_f
=
child
.
getChild
(
0
).
text
string
+=
target_option
.
format
(
kind
=
kind
,
target
=
"source"
,
function
=
f
unc
)
function
=
f
rom_f
)
elif
child
.
type
==
lexer
.
TO
:
func
=
child
.
getChild
(
0
).
text
to_f
=
child
.
getChild
(
0
).
text
string
+=
target_option
.
format
(
kind
=
kind
,
target
=
"dest"
,
function
=
func
)
function
=
to_f
)
elif
child
.
type
==
lexer
.
IOPARAM
:
# optional parameter
...
...
@@ -1686,6 +1685,8 @@ def io_expression(root, context):
else
:
raise
NotImplementedError
(
"In io_expression"
)
func
=
from_f
if
direction
==
"out"
else
to_f
if
msg
:
string
+=
msg_name
.
format
(
kind
=
kind
,
function
=
func
,
...
...
@@ -1718,7 +1719,7 @@ def io_expression(root, context):
if
not
errs
:
try
:
pname
,
ptype
=
list
(
find_basic_type
(
param_expr
.
exprType
).
Children
.
items
())[
0
]
except
IndexError
:
except
(
IndexError
,
AttributeError
)
:
errors
.
append
(
f
"No parameter expected for message
{
msg
}
"
)
else
:
path
+=
f
".
{
pname
}
"
...
...
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