Commit 1ab8c1584d039ffaf73f70d8c1b58dd5b669f8d4
1 parent
f2f8d113
Manage the main comment of alternative
Showing
3 changed files
with
12 additions
and
4 deletions
Show diff stats
calexium_lib @ e6da20c4dc5
densaku_lib @ e7fa05a251e
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+"\"))"+ | ... | ... |