INNER CODE UNIT · Python
enumify
racenis/tram-sdk · devtools/codegen.py:147
def enumify(str):
return "FIELD_" + str.replace("-", "_").upper().strip().replace("\"", "")
def typeify(str):
if str == "name_t":
return "TYPE_NAME"
if str == "bool":
return "TYPE_BOOL"
if str == "int":
return "TYPE_INT32"
if str == "float":
return "TYPE_FLOAT32"
if str == "double":
return "TYPE_INT32"
if str == "int8_t":