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
6e976299
Commit
6e976299
authored
Feb 07, 2018
by
Maxime Perrotin
Browse files
Fix forloops type
parent
b7f80dd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/AdaGenerator.py
View file @
6e976299
...
...
@@ -1374,8 +1374,9 @@ def _task_forloop(task, **kwargs):
start_stmt
,
start_str
,
start_local
=
\
expression
(
loop
[
'range'
][
'start'
])
if
basic
.
kind
==
"Integer32Type"
:
start_str
=
u
"AsN1InT({})"
.
format
(
start_str
)
#if basic.kind == "Integer32Type":
# start_str = u"AsN1InT({})".format(start_str)
start_str
=
u
"Integer ({})"
.
format
(
start_str
)
local_decl
.
extend
(
start_local
)
stmt
.
extend
(
start_stmt
)
...
...
@@ -1386,8 +1387,9 @@ def _task_forloop(task, **kwargs):
basic
=
find_basic_type
(
loop
[
'range'
][
'stop'
].
exprType
)
stop_stmt
,
stop_str
,
stop_local
=
expression
(
loop
[
'range'
][
'stop'
])
if
basic
.
kind
==
"Integer32Type"
:
stop_str
=
u
"Asn1INt({})"
.
format
(
stop_str
)
#if basic.kind == "Integer32Type":
# stop_str = u"Asn1INt({})".format(stop_str)
stop_str
=
u
"Integer ({})"
.
format
(
stop_str
)
local_decl
.
extend
(
stop_local
)
stmt
.
extend
(
stop_stmt
)
...
...
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