From ec4db71f40f7810f02218bbf0424db1a9b6a71ae Mon Sep 17 00:00:00 2001 From: totoro Date: Sun, 9 Apr 2017 01:51:11 +0200 Subject: [PATCH] surround the name of the data component with "_" in from_message. This prevent against 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_)" --- calexium_lib | 2 +- src/generation/types_messages.anubis | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/calexium_lib b/calexium_lib index e6da20c..891e24c 160000 --- a/calexium_lib +++ b/calexium_lib @@ -1 +1 @@ -Subproject commit e6da20c4dc5c59b7da6393e52d1f5086048061c9 +Subproject commit 891e24cfc2eca3152e2cf33c5963979d963b7bae diff --git a/src/generation/types_messages.anubis b/src/generation/types_messages.anubis index bbc91ad..7a48a11 100644 --- a/src/generation/types_messages.anubis +++ b/src/generation/types_messages.anubis @@ -289,7 +289,7 @@ define String ( List(DS_Component) components )= - join(", ", map((DS_Component compo) |-> since compo is component(b_list, _, name, _), name, components)). + join(", ", map((DS_Component compo) |-> since compo is component(b_list, _, name, _), "_"+name+"_", components)). . define String @@ -310,7 +310,7 @@ define String (if b_list is list then anb_type_list_from_message(indent, type_msg, anb_type, name, name, brace_counter) else - anb_type_from_message(indent, type_msg, anb_type, name, name, brace_counter)) + anb_type_from_message(indent, type_msg, anb_type, name, "_"+name+"_", brace_counter)) + generate_component_from_message(indent, type_msg, alt_name, t, brace_counter) -- libgit2 0.21.4