Commit b13303d7 authored by Maxim Golikov's avatar Maxim Golikov
Browse files

Fixed bug with while code generation

parent bf7b53f4
......@@ -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\tEvlog::get_instance()->log(self, EventType::DELETE);\n'
cpp+='\treturn EXIT;\n'
cpp+='}\n\n'
cpp+=cpp_bodyitems
# CF END LOG
cpp+='\n\tEvlog::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\tchild->arg(%d, "%s")=%s;\n' \
% (i, scope['children'][-1]['arg_names'][i], arg)
% (i, arg_name, arg)
else:
forks+='\t\tchild->arg(%d, "%s"); // uninitialized\n' % (i, arg)
for i in range(len(scope['children'][-1]['ids'])):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment