Commit ec4db71f40f7810f02218bbf0424db1a9b6a71ae
1 parent
42e9e48d
surround the name of the data component with "_" in from_message. This prevent a…
…gainst to have same name for component and data. If we have a type like: define Type: name (String name). with have same name for component and data. Even if we retrieve the value like .... (name) and want to create the type like name(name), Anubis compiler doesn't understand and it's normal. So that surrounding will make like that ...(_name_) and the type creation become OK with "name(_name_)"
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
calexium_lib @ 891e24cfc2e
src/generation/types_messages.anubis
| ... | ... | @@ -289,7 +289,7 @@ define String |
| 289 | 289 | ( |
| 290 | 290 | List(DS_Component) components |
| 291 | 291 | )= |
| 292 | - join(", ", map((DS_Component compo) |-> since compo is component(b_list, _, name, _), name, components)). | |
| 292 | + join(", ", map((DS_Component compo) |-> since compo is component(b_list, _, name, _), "_"+name+"_", components)). | |
| 293 | 293 | . |
| 294 | 294 | |
| 295 | 295 | define String |
| ... | ... | @@ -310,7 +310,7 @@ define String |
| 310 | 310 | (if b_list is list then |
| 311 | 311 | anb_type_list_from_message(indent, type_msg, anb_type, name, name, brace_counter) |
| 312 | 312 | else |
| 313 | - anb_type_from_message(indent, type_msg, anb_type, name, name, brace_counter)) | |
| 313 | + anb_type_from_message(indent, type_msg, anb_type, name, "_"+name+"_", brace_counter)) | |
| 314 | 314 | + |
| 315 | 315 | generate_component_from_message(indent, type_msg, alt_name, t, brace_counter) |
| 316 | 316 | ... | ... |