Commit 3c636a92985909b43a98f2ef5d6306ab1c202ff0
1 parent
11e498dc
add some missing read files
fix the generation of from message for list of One and Int
Showing
3 changed files
with
16 additions
and
8 deletions
Show diff stats
src/generation/types_header.anubis
src/generation/types_messages.anubis
| ... | ... | @@ -187,19 +187,25 @@ define String |
| 187 | 187 | if anb_type is |
| 188 | 188 | { |
| 189 | 189 | //empty then indent + "with " + name + " = map_escape(( String str ) |-> (Maybe(String)) from_Message(msg), find_strings("+type_msg+", \""+name+"\")),\n", |
| 190 | - one then indent + "with " + name + " = map_escape((Message msg) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_messages("+type_msg+", \""+name+"\")),\n", | |
| 190 | + one then | |
| 191 | + brace_counter <- *brace_counter + 1; | |
| 192 | + indent + "with mb_" + name + " = map_escape((Message msg) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_messages("+type_msg+", \""+name+"\")),\n"+ | |
| 193 | + indent + " if mb_" + name + " is {failure then failure, success("+ name + ") then \n", | |
| 191 | 194 | bool then indent + "with " + name + " = find_bool_list("+type_msg+", \""+name+"\"),\n", |
| 192 | - int then indent + "with " + name + " = map_escape((String int_str) |-> decimal_scan(int_str), find_string_list("+type_msg+", \""+name+"\")),\n", | |
| 195 | + int then | |
| 196 | + brace_counter <- *brace_counter + 1; | |
| 197 | + indent + "with mb_" + name + " = map_escape((String int_str) |-> decimal_scan(int_str), find_string_list("+type_msg+", \""+name+"\")),\n"+ | |
| 198 | + indent + " if mb_" + name + " is {failure then failure, success("+ name + ") then \n", | |
| 193 | 199 | string then indent + "with " + name + " = find_string_list("+type_msg+", \""+name+"\"),\n", |
| 194 | 200 | float then indent + "with " + name + " = find_float_list("+type_msg+", \""+name+"\"),\n", |
| 195 | 201 | ds_type(type_name) then |
| 196 | 202 | brace_counter <- *brace_counter + 1; |
| 197 | - indent +"with _"+name+" = map_escape(( Message msg ) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_message_list("+type_msg+", \""+name+"\")),\n"+ | |
| 198 | - indent +" if _"+name+" is {failure then failure, success("+name+") then\n", | |
| 203 | + indent +"with mb_"+name+" = map_escape(( Message msg ) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_message_list("+type_msg+", \""+name+"\")),\n"+ | |
| 204 | + indent +" if mb_"+name+" is {failure then failure, success("+name+") then\n", | |
| 199 | 205 | extern_type(type_name, _) then |
| 200 | 206 | brace_counter <- *brace_counter + 1; |
| 201 | - indent +"with _"+name+" = map_escape(( Message msg ) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_message_list("+type_msg+", \""+name+"\")),\n"+ | |
| 202 | - indent +" if _"+name+" is {failure then failure, success("+name+") then\n" | |
| 207 | + indent +"with mb_"+name+" = map_escape(( Message msg ) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_message_list("+type_msg+", \""+name+"\")),\n"+ | |
| 208 | + indent +" if mb_"+name+" is {failure then failure, success("+name+") then\n" | |
| 203 | 209 | } |
| 204 | 210 | . |
| 205 | 211 | ... | ... |
src/main.anubis
| 1 | 1 | /************************************************** |
| 2 | - * Project* The Takaden (高伝) project | |
| 2 | + * Project* The 伝作 (Densaku) project | |
| 3 | 3 | * |
| 4 | 4 | * *Title* Generating type and Muscle message with Anubis |
| 5 | 5 | * |
| ... | ... | @@ -40,7 +40,7 @@ public define List(DS_Type) the_types_list = |
| 40 | 40 | component(string, "first_name"), |
| 41 | 41 | component(string, "last_name"), |
| 42 | 42 | component(list, int, "extension_list"), |
| 43 | - component(extern_type("DB_Entry", "calexium_lib/database.anubis"), "db_id") | |
| 43 | + component(extern_type("DB_id", "calexium_lib/model/db_types.anubis"), "db_id") | |
| 44 | 44 | ]) |
| 45 | 45 | ]), |
| 46 | 46 | ... | ... |