Commit 2e8d7efa855f14b1a3ddcf12db6e8368d5b50aa5
1 parent
c0a6eb38
add messages_SHA1 in comparison to determine if we need to generate files
come back to Float instead of Float32 and Float64 which are still not implemented in current Anubis version
Showing
4 changed files
with
12 additions
and
12 deletions
Show diff stats
calexium_lib @ eb2fde09028
densaku_lib @ 25d756bcd7e
src/generation/files.anubis
| @@ -44,7 +44,7 @@ public define Maybe(One) | @@ -44,7 +44,7 @@ public define Maybe(One) | ||
| 44 | println("Current Messages SHA1 = "+messages_SHA1); | 44 | println("Current Messages SHA1 = "+messages_SHA1); |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | - if types_SHA1 = current_types_SHA1 then | 47 | + if types_SHA1 = current_types_SHA1 & messages_SHA1 = current_messages_SHA1 then |
| 48 | success(println("Types and messages already generated, nothing to do")) | 48 | success(println("Types and messages already generated, nothing to do")) |
| 49 | else | 49 | else |
| 50 | if check_types(types) is | 50 | if check_types(types) is |
src/generation/types_messages.anubis
| @@ -64,10 +64,10 @@ public define String | @@ -64,10 +64,10 @@ public define String | ||
| 64 | "add_int32("+type_msg+", \""+field_name+"\", _"+name+")", | 64 | "add_int32("+type_msg+", \""+field_name+"\", _"+name+")", |
| 65 | string then | 65 | string then |
| 66 | "add_string("+type_msg+", \""+field_name+"\", _"+name+")", | 66 | "add_string("+type_msg+", \""+field_name+"\", _"+name+")", |
| 67 | - float32 then | 67 | + float then |
| 68 | "add_float32("+type_msg+", \""+field_name+"\", _"+name+")", | 68 | "add_float32("+type_msg+", \""+field_name+"\", _"+name+")", |
| 69 | - float64 then | ||
| 70 | - "add_float64("+type_msg+", \""+field_name+"\", _"+name+")", | 69 | +// float64 then |
| 70 | +// "add_float64("+type_msg+", \""+field_name+"\", _"+name+")", | ||
| 71 | ds_type(type_name) then | 71 | ds_type(type_name) then |
| 72 | "add_message("+type_msg+", \""+field_name+"\", to_Message(_"+name+"))", | 72 | "add_message("+type_msg+", \""+field_name+"\", to_Message(_"+name+"))", |
| 73 | extern_type(type_name, _) then //external type. No need to check | 73 | extern_type(type_name, _) then //external type. No need to check |
| @@ -210,8 +210,8 @@ public define String | @@ -210,8 +210,8 @@ public define String | ||
| 210 | word16 then indent + "with " + name + " = find_int16_list("+type_msg+", \""+field_name+"\"),\n", | 210 | word16 then indent + "with " + name + " = find_int16_list("+type_msg+", \""+field_name+"\"),\n", |
| 211 | word32 then indent + "with " + name + " = find_int32_list("+type_msg+", \""+field_name+"\"),\n", | 211 | word32 then indent + "with " + name + " = find_int32_list("+type_msg+", \""+field_name+"\"),\n", |
| 212 | string then indent + "with " + name + " = find_string_list("+type_msg+", \""+field_name+"\"),\n", | 212 | string then indent + "with " + name + " = find_string_list("+type_msg+", \""+field_name+"\"),\n", |
| 213 | - float32 then indent + "with " + name + " = find_float32_list("+type_msg+", \""+field_name+"\"),\n", | ||
| 214 | - float64 then indent + "with " + name + " = find_float64_list("+type_msg+", \""+field_name+"\"),\n", | 213 | + float then indent + "with " + name + " = find_float32_list("+type_msg+", \""+field_name+"\"),\n", |
| 214 | +// float64 then indent + "with " + name + " = find_float64_list("+type_msg+", \""+field_name+"\"),\n", | ||
| 215 | ds_type(type_name) then | 215 | ds_type(type_name) then |
| 216 | brace_counter <- *brace_counter + 1; | 216 | brace_counter <- *brace_counter + 1; |
| 217 | indent +"with mb_"+name+" = map_escape(( Message msg ) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_message_list("+type_msg+", \""+field_name+"\")),\n"+ | 217 | indent +"with mb_"+name+" = map_escape(( Message msg ) |-> (Maybe("+dump(anb_type)+ ")) from_Message(msg), find_message_list("+type_msg+", \""+field_name+"\")),\n"+ |
| @@ -257,12 +257,12 @@ public define String | @@ -257,12 +257,12 @@ public define String | ||
| 257 | string then | 257 | string then |
| 258 | brace_counter <- (*brace_counter + 1); | 258 | brace_counter <- (*brace_counter + 1); |
| 259 | indent + "if find_string("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n", | 259 | indent + "if find_string("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n", |
| 260 | - float32 then | 260 | + float then |
| 261 | brace_counter <- (*brace_counter + 1); | 261 | brace_counter <- (*brace_counter + 1); |
| 262 | indent + "if find_float32("+type_msg+", \""+field_name+"\)"+" is {failure then failure, success("+name+") then\n", | 262 | indent + "if find_float32("+type_msg+", \""+field_name+"\)"+" is {failure then failure, success("+name+") then\n", |
| 263 | - float64 then | ||
| 264 | - brace_counter <- (*brace_counter + 1); | ||
| 265 | - indent + "if find_float64("+type_msg+", \""+field_name+"\)"+" is {failure then failure, success("+name+") then\n", | 263 | +// float64 then |
| 264 | +// brace_counter <- (*brace_counter + 1); | ||
| 265 | +// indent + "if find_float64("+type_msg+", \""+field_name+"\)"+" is {failure then failure, success("+name+") then\n", | ||
| 266 | ds_type(type_name) then | 266 | ds_type(type_name) then |
| 267 | brace_counter <- (*brace_counter + 2); | 267 | brace_counter <- (*brace_counter + 2); |
| 268 | indent + "if find_message("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+"_msg) then\n"+ | 268 | indent + "if find_message("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+"_msg) then\n"+ |