Commit 2e8d7efa855f14b1a3ddcf12db6e8368d5b50aa5

Authored by totoro
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
calexium_lib @ eb2fde09028
1   -Subproject commit a3acb343c746388ec4fb76fceabc1f22e9f3c37d
  1 +Subproject commit eb2fde090283bc3b3544600818bb68f2eafe3541
... ...
densaku_lib @ 25d756bcd7e
1   -Subproject commit 7be0acc189ec7b831dce1255ac3e498c0002305e
  1 +Subproject commit 25d756bcd7e519bc16eb30aa368b96812c2c30b9
... ...
src/generation/files.anubis
... ... @@ -44,7 +44,7 @@ public define Maybe(One)
44 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 48 success(println("Types and messages already generated, nothing to do"))
49 49 else
50 50 if check_types(types) is
... ...
src/generation/types_messages.anubis
... ... @@ -64,10 +64,10 @@ public define String
64 64 "add_int32("+type_msg+", \""+field_name+"\", _"+name+")",
65 65 string then
66 66 "add_string("+type_msg+", \""+field_name+"\", _"+name+")",
67   - float32 then
  67 + float then
68 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 71 ds_type(type_name) then
72 72 "add_message("+type_msg+", \""+field_name+"\", to_Message(_"+name+"))",
73 73 extern_type(type_name, _) then //external type. No need to check
... ... @@ -210,8 +210,8 @@ public define String
210 210 word16 then indent + "with " + name + " = find_int16_list("+type_msg+", \""+field_name+"\"),\n",
211 211 word32 then indent + "with " + name + " = find_int32_list("+type_msg+", \""+field_name+"\"),\n",
212 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 215 ds_type(type_name) then
216 216 brace_counter <- *brace_counter + 1;
217 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 257 string then
258 258 brace_counter <- (*brace_counter + 1);
259 259 indent + "if find_string("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+") then\n",
260   - float32 then
  260 + float then
261 261 brace_counter <- (*brace_counter + 1);
262 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 266 ds_type(type_name) then
267 267 brace_counter <- (*brace_counter + 2);
268 268 indent + "if find_message("+type_msg+", \""+field_name+"\")"+" is {failure then failure, success("+name+"_msg) then\n"+
... ...