Commit 1ab8c1584d039ffaf73f70d8c1b58dd5b669f8d4

Authored by totoro
1 parent f2f8d113

Manage the main comment of alternative

calexium_lib @ e6da20c4dc5
1   -Subproject commit eb2fde090283bc3b3544600818bb68f2eafe3541
  1 +Subproject commit e6da20c4dc5c59b7da6393e52d1f5086048061c9
... ...
densaku_lib @ e7fa05a251e
1   -Subproject commit c20e8ff6bc5e539bf89c0067dadc79d1b8300575
  1 +Subproject commit e7fa05a251e0fe746b9524e94b42b5093c4714bf
... ...
src/generation/types_messages.anubis
... ... @@ -125,8 +125,12 @@ define String
125 125 prefix + " forget(add_string("+type_msg+", \"__TYPE_ALT__\", \""+alt_name+"\")),\n\n",
126 126  
127 127 //generate the alternative with components
128   - alternative(alt_name, components_list) then
  128 + alternative(alt_name, comment, components_list) then
129 129 prefix + "//Alternative "+alt_name+"\n"+
  130 + (if comment != no_comment then
  131 + prefix + dump(comment)+"\n"
  132 + else
  133 + "")+
130 134 prefix + alt_name + "("+ generate_arguments_list(components_list) +")"+ " then \n"+
131 135 prefix + " forget(add_string("+type_msg+", \"__TYPE_ALT__\", \""+alt_name+"\"))"+
132 136 generate_component_to_message(prefix+" ", type_msg, alt_name, components_list)+
... ... @@ -331,9 +335,13 @@ define String
331 335 indent + "else "
332 336  
333 337 //generate the alternative with components
334   - alternative(alt_name, components_list) then
  338 + alternative(alt_name, comment, components_list) then
335 339 with begin =
336 340 "//Alternative "+alt_name+"\n"+
  341 + (if comment != no_comment then
  342 + indent + dump(comment)+"\n"
  343 + else
  344 + "")+
337 345 indent + "if __type_alt__ = \""+alt_name+"\" then //Alternative "+alt_name+"\n"+
338 346 //prefix + alt_name + "("+ generate_arguments_list(components_list) +")"+ " then \n"+
339 347 //prefix + " forget(add_string("+type_msg+", \"__TYPE_ALT__\", \""+alt_name+"\"))"+
... ...