Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
luna
LuNA
Commits
b13303d7
Commit
b13303d7
authored
Oct 12, 2022
by
Maxim Golikov
Browse files
Fixed bug with while code generation
parent
bf7b53f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/fcmp2
View file @
b13303d7
...
...
@@ -1083,14 +1083,14 @@ def gen_bi_while(ja, parent_scope):
)
cpp
+=
gen_afterstuff
(
scope
,
ja
)
cpp
+=
'
\t
} // while
\n
'
# CF END LOG
cpp
+=
'
\n\t
Evlog::get_instance()->log(self, EventType::DELETE);
\n
'
cpp
+=
'
\t
return EXIT;
\n
'
cpp
+=
'}
\n\n
'
cpp
+=
cpp_bodyitems
# CF END LOG
cpp
+=
'
\n\t
Evlog::get_instance()->log(self, EventType::DELETE);
\n
'
return
bid
,
cpp
def
gen_bi_if
(
ja
,
parent_scope
):
...
...
@@ -1179,8 +1179,10 @@ def gen_body(scope, ja):
for
i
in
range
(
len
(
scope
[
'children'
][
-
1
][
'args'
])):
arg
=
scope
[
'children'
][
-
1
][
'args'
][
i
]
if
arg
is
not
None
:
arg_names_len
=
len
(
scope
[
'children'
][
-
1
][
'arg_names'
])
arg_name
=
scope
[
'children'
][
-
1
][
'arg_names'
][
i
]
if
arg_names_len
>
i
else
'no_name'
forks
+=
'
\t\t
child->arg(%d, "%s")=%s;
\n
'
\
%
(
i
,
scope
[
'children'
][
-
1
][
'
arg_name
s'
][
i
]
,
arg
)
%
(
i
,
arg_name
,
arg
)
else
:
forks
+=
'
\t\t
child->arg(%d, "%s"); // uninitialized
\n
'
%
(
i
,
arg
)
for
i
in
range
(
len
(
scope
[
'children'
][
-
1
][
'ids'
])):
...
...
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