Forráskód Böngészése

style: 修改了部分枚举体的成员名字

SongZihuan 4 éve
szülő
commit
83e226fc3b

+ 3 - 3
VirtulMathCore/gc/gc.c

@@ -85,14 +85,14 @@ static void gc_iterValue(Value *value){
     gc_fatherValue(value->object.inherit);
     gc_resetValue(value);
     switch (value->type) {
-        case list:
+        case V_list:
             for (int i=0;i < value->data.list.size;i++)
                 gc_iterLinkValue(value->data.list.list[i]);
             break;
-        case dict:
+        case V_dict:
             gc_iterHashTable(value->data.dict.dict);
             break;
-        case function:
+        case V_func:
             gc_iterLinkValue(value->data.function.function_data.cls);
             break;
         default:

+ 16 - 16
VirtulMathCore/include/value.h

@@ -3,7 +3,7 @@
 #include "__macro.h"
 
 // 标准错误信息定义
-#define INSTANCE_ERROR(class) L##"Instance error when calling function, call non-"#class" "#class" method"
+#define INSTANCE_ERROR(class) L##"Instance error when calling V_func, call non-"#class" "#class" method"
 #define VALUE_ERROR(value, acc) L###value" value is not a "#acc" (may be modified by an external program)"
 #define ONLY_ACC(var, value) L###var" only accepts "#value
 #define ERROR_INIT(class) L###class" get wrong initialization parameters"
@@ -11,7 +11,7 @@
 #define FEW_ARG L##"Too few parameters"
 #define CUL_ERROR(opt) L###opt" operation gets incorrect value"
 #define OBJ_NOTSUPPORT(opt) L##"Object does not support "#opt" operation"
-#define RETURN_ERROR(func, type) L###func" function should return "#type" type data"
+#define RETURN_ERROR(func, type) L###func" V_func should return "#type" type data"
 #define KEY_INTERRUPT L##"KeyInterrupt"
 
 typedef struct Argument Argument;
@@ -38,16 +38,16 @@ enum ValueAuthority {
 };
 
 enum ValueType {
-    none=0,
-    number=1,
-    string=2,
-    function=3,
-    list=4,
-    dict=5,
-    class=6,
-    object_=7,
-    bool_=8,
-    pass_=9,
+    V_none=0,
+    V_num=1,
+    V_str=2,
+    V_func=3,
+    V_list=4,
+    V_dict=5,
+    V_class=6,
+    V_obj=7,
+    V_bool=8,
+    V_ell=9,
 };
 
 struct Number {
@@ -60,8 +60,8 @@ struct String {
 
 struct Function{
     enum {
-        c_function,
-        vm_function,
+        c_func,
+        vm_func,
     } type;
     struct Statement *function;
     struct Parameter *pt;
@@ -85,8 +85,8 @@ struct Function{
 
 struct List {
     enum ListType {
-        value_tuple,
-        value_list,
+        L_tuple,
+        L_list,
     } type;
     struct LinkValue **list;
     vnum size;

+ 1 - 1
VirtulMathCore/ofunc/src/bool.c

@@ -13,7 +13,7 @@ ResultType bool_new(OFFICAL_FUNCTIONSIG){
 
     setResultCore(result);
     value = make_new(inter, belong, ap[0].value);
-    value->value->type = bool_;
+    value->value->type = V_bool;
     value->value->data.bool_.bool_ = false;
     switch (init_new(value, arg, "bool.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:

+ 26 - 26
VirtulMathCore/ofunc/src/dict.c

@@ -13,13 +13,13 @@ ResultType dict_new(OFFICAL_FUNCTIONSIG){
     }
 
     if (arg != NULL && arg->type == value_arg) {
-        setResultError(E_ArgumentException, L"Too many argument", 0, "dict.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, L"Too many argument", 0, "V_dict.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
     value = make_new(inter, belong, ap[0].value);
     hash = pushVarList(var_list, inter);
-    value->value->type = dict;
+    value->value->type = V_dict;
     value->value->data.dict.size = 0;
     value->value->data.dict.dict = hash->hashtable;
 
@@ -29,7 +29,7 @@ ResultType dict_new(OFFICAL_FUNCTIONSIG){
     popVarList(hash);
 
     freeResult(result);
-    switch (init_new(value, NULL, "dict.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    switch (init_new(value, NULL, "V_dict.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:
             freeResult(result);
             setResultOperation(result, value);
@@ -52,8 +52,8 @@ ResultType dict_down(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_dict){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_dict), 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     {
@@ -64,7 +64,7 @@ ResultType dict_down(OFFICAL_FUNCTIONSIG){
             setResultOperationBase(result, copyLinkValue(element, inter));
         else {
             wchar_t *message = memWidecat(L"Dict could not find key value: ", name, false, false);
-            setResultError(E_KeyException, message, 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_KeyException, message, 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             memFree(message);
         }
         memFree(name);
@@ -82,8 +82,8 @@ ResultType dict_down_del(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_dict){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_dict), 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     {
@@ -94,7 +94,7 @@ ResultType dict_down_del(OFFICAL_FUNCTIONSIG){
             setResult(result, inter);
         else{
             wchar_t *message = memWidecat(L"Cannot delete non-existent keys: ", name, false, false);
-            setResultError(E_KeyException, message, 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_KeyException, message, 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             memFree(message);
         }
         memFree(name);
@@ -114,8 +114,8 @@ ResultType dict_down_assignment(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_dict){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_dict), 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -134,8 +134,8 @@ ResultType dict_keys(OFFICAL_FUNCTIONSIG){
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
-    if (ap[0].value->value->type != dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_dict){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_dict), 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     for (int index=0; index < MAX_SIZE; index++){
@@ -143,7 +143,7 @@ ResultType dict_keys(OFFICAL_FUNCTIONSIG){
         for (PASS; tmp != NULL; tmp = tmp->next)
             list = connectValueArgument(copyLinkValue(tmp->name_, inter), list);
     }
-    makeListValue(list, 0, "dict", value_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeListValue(list, 0, "V_dict", L_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     freeArgument(list, true);
     return result->type;
 }
@@ -157,13 +157,13 @@ ResultType dict_iter(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_dict){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_dict), 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     {
         Argument *dict_iter_arg = makeValueArgument(ap[0].value);
-        callBackCore(inter->data.dict_iter, dict_iter_arg, 0, "dict", 0,
+        callBackCore(inter->data.dict_iter, dict_iter_arg, 0, "V_dict", 0,
                      CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         freeArgument(dict_iter_arg, true);
     }
@@ -183,8 +183,8 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     freeResult(result);
     value = ap[0].value->value;
 
-    if (value->type != dict){
-        setResultError(E_TypeException, INSTANCE_ERROR(dict), 0, "dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (value->type != V_dict){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_dict), 0, "V_dict", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     again = findAttributes(is_repo ? L"repo_again" : L"str_again", false, ap[0].value, inter);
@@ -193,12 +193,12 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
         if (!CHECK_RESULT(result))
             return result->type;
         if (again_) {
-            makeStringValue(L"{...}", 0, "dict.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            makeStringValue(L"{...}", 0, "V_dict.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             return result->type;
         }
     }
 
-    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "V_dict.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     repo = memWidecpy(L"{");
     for (int i = 0, count = 0; i < MAX_SIZE; i++) {
         for (Var *var = value->data.dict.dict->hashtable[i]; var != NULL; var = var->next, count++) {
@@ -208,14 +208,14 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
                 repo = memWidecat(repo, L", ", true, false);
 
             freeResult(result);
-            name_tmp = getRepoStr(var->name_, is_repo, 0, "dict", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            name_tmp = getRepoStr(var->name_, is_repo, 0, "V_dict", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             if (!CHECK_RESULT(result))
                 goto return_;
             repo = memWidecat(repo, name_tmp, true, false);
             repo = memWidecat(repo, L": ", true, false);
 
             freeResult(result);
-            value_tmp = getRepoStr(var->value, is_repo, 0, "dict", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            value_tmp = getRepoStr(var->value, is_repo, 0, "V_dict", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             if (!CHECK_RESULT(result))
                 goto return_;
             repo = memWidecat(repo, value_tmp, true, false);
@@ -224,13 +224,13 @@ ResultType dictRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
 
     freeResult(result);
     repo = memWidecat(repo, L"}", true, false);
-    makeStringValue(repo, 0, "dict.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(repo, 0, "V_dict.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
 
     return_:
     {
         Result tmp;
         setResultCore(&tmp);
-        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "dict.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp, belong));
+        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "V_dict.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp, belong));
         if (!RUN_TYPE(tmp.type)) {
             freeResult(result);
             *result = tmp;
@@ -261,7 +261,7 @@ void registeredDict(REGISTERED_FUNCTIONSIG){
                       {inter->data.object_down_del, dict_down_del, object_free_},
                       {NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
-    addBaseClassVar(L"dict", object, belong, inter);
+    addBaseClassVar(L"V_dict", object, belong, inter);
     iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }

+ 4 - 4
VirtulMathCore/ofunc/src/dictiter.c

@@ -11,8 +11,8 @@ ResultType dictiter_init(OFFICAL_FUNCTIONSIG){
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
-    if (ap[1].value->value->type != dict){
-        setResultError(E_TypeException, ONLY_ACC(dictiter, dict), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[1].value->value->type != V_dict){
+        setResultError(E_TypeException, ONLY_ACC(dictiter, V_dict), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     {
@@ -101,8 +101,8 @@ ResultType dictiter_down(OFFICAL_FUNCTIONSIG){
     if (!CHECK_RESULT(result))
         return result->type;
     dict_ = findAttributes(L"__dict", false, ap[0].value, inter);
-    if (dict_ == NULL || dict_->value->type != dict){
-        setResultError(E_TypeException, VALUE_ERROR(__dict, dict), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (dict_ == NULL || dict_->value->type != V_dict){
+        setResultError(E_TypeException, VALUE_ERROR(__dict, V_dict), 0, "dictiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 

+ 8 - 8
VirtulMathCore/ofunc/src/function.c

@@ -13,7 +13,7 @@ ResultType function_new(OFFICAL_FUNCTIONSIG){
     setResultCore(result);
     arg = parserValueArgument(ap, arg, &status, NULL);
     if (status != 1){
-        setResultError(E_ArgumentException, FEW_ARG, 0, "function.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_ArgumentException, FEW_ARG, 0, "V_func.new", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -24,14 +24,14 @@ ResultType function_new(OFFICAL_FUNCTIONSIG){
         value = makeLinkValue(new_object, belong, inter);
     }
 
-    value->value->type = function;
-    value->value->data.function.type = vm_function;
+    value->value->type = V_func;
+    value->value->data.function.type = vm_func;
     value->value->data.function.function = NULL;
     value->value->data.function.pt = NULL;
     value->value->data.function.of = NULL;
     setFunctionData(value->value, ap->value, inter);
 
-    switch (init_new(value, arg, "function.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    switch (init_new(value, arg, "V_func.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:
             freeResult(result);
             setResultOperation(result, value);
@@ -52,8 +52,8 @@ ResultType function_init(OFFICAL_FUNCTIONSIG){
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
-    if ((func = ap[0].value)->value->type != function) {
-        setResultError(E_TypeException, INSTANCE_ERROR(function), 0, "function", true,
+    if ((func = ap[0].value)->value->type != V_func) {
+        setResultError(E_TypeException, INSTANCE_ERROR(V_func), 0, "V_func", true,
                        CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
@@ -62,7 +62,7 @@ ResultType function_init(OFFICAL_FUNCTIONSIG){
         Statement *return_ = makeBaseLinkValueStatement(ap[1].value, 0, "sys");
         func->value->data.function.function = makeReturnStatement(return_, 0, "sys");
         func->value->data.function.function_data.pt_type = free_;
-        func->value->data.function.type = vm_function;
+        func->value->data.function.type = vm_func;
     }
 
     setResult(result, inter);
@@ -73,7 +73,7 @@ void registeredFunction(REGISTERED_FUNCTIONSIG){
     LinkValue *object = inter->data.function;
     NameFunc tmp[] = {{NULL, NULL}};
     gc_addTmpLink(&object->gc_status);
-    addBaseClassVar(L"function", object, belong, inter);
+    addBaseClassVar(L"V_func", object, belong, inter);
     iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
     gc_freeTmpLink(&object->gc_status);
 }

+ 1 - 1
VirtulMathCore/ofunc/src/io.c

@@ -21,7 +21,7 @@ ResultType vm_print(OFFICAL_FUNCTIONSIG){
         fprintf(inter->data.inter_stdout, "%ls", tmp);
     }
 
-    if (ap[1].value != NULL && ap[1].value->value->type == string)
+    if (ap[1].value != NULL && ap[1].value->value->type == V_str)
         fprintf(inter->data.inter_stdout, "%ls", ap[1].value->value->data.str.str);
     else
         fprintf(inter->data.inter_stdout, "\n");

+ 51 - 51
VirtulMathCore/ofunc/src/list.c

@@ -12,7 +12,7 @@ ResultType tuple_list_newCore(OFFICAL_FUNCTIONSIG, enum ListType type){
     freeResult(result);
 
     value = make_new(inter, belong, ap[0].value);
-    value->value->type = list;
+    value->value->type = V_list;
     value->value->data.list.type = type;
     value->value->data.list.list = NULL;
     value->value->data.list.size = 0;
@@ -23,7 +23,7 @@ ResultType tuple_list_newCore(OFFICAL_FUNCTIONSIG, enum ListType type){
         value->value->data.list.list[value->value->data.list.size - 1] = at->data.value;
     }
 
-    switch (init_new(value, NULL, "list.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
+    switch (init_new(value, NULL, "V_list.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:
             freeResult(result);
             setResultOperation(result, value);
@@ -35,11 +35,11 @@ ResultType tuple_list_newCore(OFFICAL_FUNCTIONSIG, enum ListType type){
 }
 
 ResultType tuple_new(OFFICAL_FUNCTIONSIG) {
-    return tuple_list_newCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), value_tuple);
+    return tuple_list_newCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), L_tuple);
 }
 
 ResultType list_new(OFFICAL_FUNCTIONSIG) {
-    return tuple_list_newCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), value_list);
+    return tuple_list_newCore(CALL_OFFICAL_FUNCTION(arg, var_list, result, belong), L_list);
 }
 
 ResultType list_slice(OFFICAL_FUNCTIONSIG){
@@ -58,8 +58,8 @@ ResultType list_slice(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list) {
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list) {
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
@@ -68,10 +68,10 @@ ResultType list_slice(OFFICAL_FUNCTIONSIG){
     second = size;
     stride = 1;
     for (vnum *list[]={&first, &second, &stride}, i=0; i < 3; i++) {
-        if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == number)
+        if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == V_num)
             *(list[i]) = ap[i + 1].value->value->data.num.num;
-        else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != none) {
-            setResultError(E_TypeException, ONLY_ACC(first/second/stride, number or none), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != V_none) {
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, V_num or V_none), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             return R_error;
         }
     }
@@ -85,7 +85,7 @@ ResultType list_slice(OFFICAL_FUNCTIONSIG){
             LinkValue *element = ap[0].value->value->data.list.list[i];
             new_list = connectValueArgument(element, new_list);
         }
-        makeListValue(new_list, 0, "list.slice", value_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeListValue(new_list, 0, "V_list.slice", L_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         freeArgument(new_list, true);
     }
     return result->type;
@@ -109,12 +109,12 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list) {
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list) {
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
-    getIter(ap[1].value, 1, 0, "list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    getIter(ap[1].value, 1, 0, "V_list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     if (!CHECK_RESULT(result))
         return result->type;
     iter_obj = result->value;
@@ -125,10 +125,10 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
     second = size;
     stride = 1;
     for (vnum *list[]={&first, &second, &stride}, i=0; i < 3; i++) {
-        if (ap[i + 2].value != NULL && ap[i + 2].value->value->type == number)
+        if (ap[i + 2].value != NULL && ap[i + 2].value->value->type == V_num)
             *(list[i]) = ap[i + 2].value->value->data.num.num;
-        else if (ap[i + 2].value != NULL && ap[i + 2].value->value->type != none) {
-            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        else if (ap[i + 2].value != NULL && ap[i + 2].value->value->type != V_none) {
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             goto return_;
         }
     }
@@ -139,9 +139,9 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
     {
         for (vnum i = stride > 0 ? first : second; stride > 0 ? (i < second) : (i > first); i += stride) {
             freeResult(result);
-            getIter(iter_obj, 0, 0, "list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            getIter(iter_obj, 0, 0, "V_list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             if (is_iterStop(result->value, inter)){
-                setResultError(E_TypeException, L"Iter Object Too Short", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                setResultError(E_TypeException, L"Iter Object Too Short", 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
                 goto return_;
             }
             else if (!CHECK_RESULT(result))
@@ -149,9 +149,9 @@ ResultType list_slice_assignment(OFFICAL_FUNCTIONSIG){
             ap[0].value->value->data.list.list[i] = result->value;
         }
         freeResult(result);
-        getIter(iter_obj, 0, 0, "list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        getIter(iter_obj, 0, 0, "V_list", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         if (CHECK_RESULT(result)) {
-            setResultError(E_TypeException, L"Iter Object Too Long", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            setResultError(E_TypeException, L"Iter Object Too Long", 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             goto return_;
         } else if (!is_iterStop(result->value, inter))
             goto return_;
@@ -178,8 +178,8 @@ ResultType list_slice_del(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list) {
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list) {
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     size = ap[0].value->value->data.list.size;
@@ -188,10 +188,10 @@ ResultType list_slice_del(OFFICAL_FUNCTIONSIG){
     second = size;
     stride = 1;
     for (vnum *list[]={&first, &second, &stride}, i=0; i < 3; i++) {
-        if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == number)
+        if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == V_num)
             *(list[i]) = ap[i + 1].value->value->data.num.num;
-        else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != none) {
-            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != V_none) {
+            setResultError(E_TypeException, ONLY_ACC(first/second/stride, num or null), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             return R_error;
         }
     }
@@ -233,12 +233,12 @@ ResultType list_down_assignment(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
-    if (ap[2].value->value->type != number){
-        setResultError(E_TypeException, ONLY_ACC(list index, number), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[2].value->value->type != V_num){
+        setResultError(E_TypeException, ONLY_ACC(V_list index, V_num), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -247,10 +247,10 @@ ResultType list_down_assignment(OFFICAL_FUNCTIONSIG){
     if (index < 0)
         index = size + index;
     if (index >= size){
-        setResultError(E_IndexException, L"Index too max", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index too max", 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     } else if (index < 0){
-        setResultError(E_IndexException, L"Index less than 0", 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_IndexException, L"Index less than 0", 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     ap[0].value->value->data.list.list[index] = ap[1].value;
@@ -270,12 +270,12 @@ ResultType list_down_del(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
-    if (ap[1].value->value->type != number){
-        setResultError(E_TypeException, ONLY_ACC(list index, number), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[1].value->value->type != V_num){
+        setResultError(E_TypeException, ONLY_ACC(V_list index, V_num), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -309,12 +309,12 @@ ResultType list_down(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
-    if (ap[1].value->value->type != number){
-        setResultError(E_TypeException, ONLY_ACC(list index, number), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[1].value->value->type != V_num){
+        setResultError(E_TypeException, ONLY_ACC(V_list index, V_num), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -336,13 +336,13 @@ ResultType list_iter(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[0].value->value->type != V_list){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "V_list", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     {
         Argument *list_iter_arg = makeValueArgument(ap[0].value);
-        callBackCore(inter->data.list_iter, list_iter_arg, 0, "list", 0,
+        callBackCore(inter->data.list_iter, list_iter_arg, 0, "V_list", 0,
                      CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         freeArgument(list_iter_arg, true);
     }
@@ -363,8 +363,8 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     freeResult(result);
     value = ap[0].value->value;
 
-    if (value->type != list){
-        setResultError(E_TypeException, INSTANCE_ERROR(list), 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (value->type != V_list){
+        setResultError(E_TypeException, INSTANCE_ERROR(V_list), 0, "sys", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     lt = value->data.list.type;
@@ -374,13 +374,13 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
         if (!CHECK_RESULT(result))
             return result->type;
         if (again_) {
-            makeStringValue((lt == value_list ? L"[...]" : L"(...)"), 0, "list.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+            makeStringValue((lt == L_list ? L"[...]" : L"(...)"), 0, "V_list.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             return result->type;
         }
     }
 
-    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
-    if (lt == value_list)
+    setBoolAttrible(true, is_repo ? L"repo_again" : L"str_again", 0, "V_list.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (lt == L_list)
         repo = memWidecpy(L"[");
     else
         repo = memWidecpy(L"(");
@@ -394,18 +394,18 @@ ResultType listRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
             goto return_;
         repo = memWidecat(repo, tmp, true, false);
     }
-    if (lt == value_list)
+    if (lt == L_list)
         repo = memWidecat(repo, L"]", true, false);
     else
         repo = memWidecat(repo, L")", true, false);
 
     freeResult(result);
-    makeStringValue(repo, 0, "list.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    makeStringValue(repo, 0, "V_list.repo", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     return_:
     {
         Result tmp;
         setResultCore(&tmp);
-        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "list.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp, belong));
+        setBoolAttrible(false, is_repo ? L"repo_again" : L"str_again", 0, "V_list.repo", ap[0].value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, &tmp, belong));
         if (!RUN_TYPE(tmp.type)) {
             freeResult(result);
             *result = tmp;
@@ -449,7 +449,7 @@ void registeredList(REGISTERED_FUNCTIONSIG){
                           {inter->data.object_slice_assignment, list_slice_assignment, object_free_},
                           {NULL, NULL}};
         gc_addTmpLink(&object->gc_status);
-        addBaseClassVar(L"list", object, belong, inter);
+        addBaseClassVar(L"V_list", object, belong, inter);
         iterBaseClassFunc(tmp, object, CALL_INTER_FUNCTIONSIG_CORE(inter->var_list));
         gc_freeTmpLink(&object->gc_status);
     }

+ 6 - 6
VirtulMathCore/ofunc/src/listiter.c

@@ -10,8 +10,8 @@ ResultType listiter_init(OFFICAL_FUNCTIONSIG){
     if (!CHECK_RESULT(result))
         return result->type;
     freeResult(result);
-    if (ap[1].value->value->type != list){
-        setResultError(E_TypeException, ONLY_ACC(listiter, list), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[1].value->value->type != V_list){
+        setResultError(E_TypeException, ONLY_ACC(listiter, V_list), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -41,12 +41,12 @@ ResultType listiter_next(OFFICAL_FUNCTIONSIG){
     list_ = findAttributes(L"__list", false, ap[0].value, inter);
     index = findAttributes(L"__index", false, ap[0].value, inter);
 
-    if (list_->value->type != list){
-        setResultError(E_TypeException, VALUE_ERROR(listiter.__list, list), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (list_->value->type != V_list){
+        setResultError(E_TypeException, VALUE_ERROR(listiter.__list, V_list), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
-    if (index->value->type != number){
-        setResultError(E_TypeException, VALUE_ERROR(listiter.__index, number), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (index->value->type != V_num){
+        setResultError(E_TypeException, VALUE_ERROR(listiter.__index, V_num), 0, "listiter", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 

+ 6 - 6
VirtulMathCore/ofunc/src/num.c

@@ -13,7 +13,7 @@ ResultType num_new(OFFICAL_FUNCTIONSIG){
 
     setResultCore(result);
     value = make_new(inter, belong, ap[0].value);
-    value->value->type = number;
+    value->value->type = V_num;
     value->value->data.num.num = 0;
     switch (init_new(value, arg, "num", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:
@@ -41,17 +41,17 @@ ResultType num_init(OFFICAL_FUNCTIONSIG){
     if (ap[1].value == NULL)
         goto return_;
     switch (ap[1].value->value->type){
-        case number:
+        case V_num:
             base->value->data.num.num = ap[1].value->value->data.num.num;
             break;
-        case string:
+        case V_str:
             base->value->data.num.num = wcstoll(ap[1].value->value->data.str.str, NULL, 10);
             break;
-        case bool_:
+        case V_bool:
             base->value->data.num.num = ap[1].value->value->data.bool_.bool_;
             break;
-        case none:
-        case pass_:
+        case V_none:
+        case V_ell:
             base->value->data.num.num = 0;
             break;
         default:

+ 4 - 4
VirtulMathCore/ofunc/src/object.c

@@ -48,12 +48,12 @@ ResultType objectRepoStrCore(OFFICAL_FUNCTIONSIG, bool is_repo){
     } else
         name = L"unknown";
 
-    if (ap[0].value->value->type == none) {
+    if (ap[0].value->value->type == V_none) {
         repo = memWidecpy(L"null");
     } else {
         size_t len;
-        if (ap[0].value->value->type == class)
-            type = L"class";
+        if (ap[0].value->value->type == V_class)
+            type = L"V_class";
         else
             type = L"object";
         len = memWidelen(name) + 30;
@@ -111,7 +111,7 @@ void makeBaseObject(Inter *inter, LinkValue *belong){
         setResultCore(&result);
         object_new(CALL_OFFICAL_FUNCTION(arg, inter->var_list, &result, g_belong));
 
-        result.value->value->type = none;
+        result.value->value->type = V_none;
         inter->data.none = result.value;
         gc_addStatementLink(&inter->data.none->gc_status);
 

+ 1 - 1
VirtulMathCore/ofunc/src/pass.c

@@ -12,7 +12,7 @@ ResultType pass_new(OFFICAL_FUNCTIONSIG){
         return R_error;
     }
     value = make_new(inter, belong, ap[0].value);
-    value->value->type = pass_;
+    value->value->type = V_ell;
     switch (init_new(value, arg, "pass.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:
             freeResult(result);

+ 11 - 11
VirtulMathCore/ofunc/src/str.c

@@ -12,7 +12,7 @@ ResultType str_new(OFFICAL_FUNCTIONSIG){
     }
     setResultCore(result);
     value = make_new(inter, belong, ap[0].value);
-    value->value->type = string;
+    value->value->type = V_str;
     value->value->data.str.str = memWidecpy(L"");
     switch (init_new(value, arg, "str.new", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong))) {
         case 1:
@@ -65,7 +65,7 @@ ResultType str_slice(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != string) {
+    if (ap[0].value->value->type != V_str) {
         setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
@@ -75,9 +75,9 @@ ResultType str_slice(OFFICAL_FUNCTIONSIG){
     second = size;
     stride = 1;
     for (vnum *list[]={&first, &second, &stride}, i=0; i < 3; i++) {
-        if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == number)
+        if (ap[i + 1].value != NULL && ap[i + 1].value->value->type == V_num)
             *(list[i]) = ap[i + 1].value->value->data.num.num;
-        else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != none) {
+        else if (ap[i + 1].value != NULL && ap[i + 1].value->value->type != V_none) {
             setResultError(E_TypeException, VALUE_ERROR(first/second/stride, num or null), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             return R_error;
         }
@@ -109,12 +109,12 @@ ResultType str_down(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != string){
+    if (ap[0].value->value->type != V_str){
         setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
-    if (ap[1].value->value->type != number){
-        setResultError(E_TypeException, ONLY_ACC(str index, number), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (ap[1].value->value->type != V_num){
+        setResultError(E_TypeException, ONLY_ACC(str index, V_num), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 
@@ -137,7 +137,7 @@ ResultType str_to_list(OFFICAL_FUNCTIONSIG){
         return result->type;
     freeResult(result);
 
-    if (ap[0].value->value->type != string){
+    if (ap[0].value->value->type != V_str){
         setResultError(E_TypeException, INSTANCE_ERROR(str), 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
@@ -152,7 +152,7 @@ ResultType str_to_list(OFFICAL_FUNCTIONSIG){
             new_list = connectValueArgument(result->value, new_list);
             freeResult(result);
         }
-        makeListValue(new_list, 0, "str", value_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeListValue(new_list, 0, "str", L_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         freeArgument(new_list, true);
     }
     return result->type;
@@ -169,7 +169,7 @@ ResultType str_iter(OFFICAL_FUNCTIONSIG){
     freeResult(result);
     to_list = findAttributes(L"to_list", false, ap[0].value, inter);
     if (to_list == NULL){
-        setResultError(E_TypeException, L"String cannot be converted to list", 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        setResultError(E_TypeException, L"String cannot be converted to V_list", 0, "str", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
     gc_addTmpLink(&to_list->gc_status);
@@ -227,7 +227,7 @@ LinkValue *makeStrFromOf(LinkValue *str, LinkValue *new, LinkValue *init, wchar_
 LinkValue *makeFunctionFromValue(LinkValue *func, LinkValue *new, LinkValue *init, OfficialFunction of, LinkValue *belong, VarList *var_list, Inter *inter) {
     LinkValue *new_func;
     new_func = callClassOf(func, inter, new, init);
-    new_func->value->data.function.type = c_function;
+    new_func->value->data.function.type = c_func;
     new_func->value->data.function.of = of;
     new_func->value->data.function.function_data.pt_type = inter->data.default_pt_type;
     for (VarList *vl = new_func->value->object.out_var; vl != NULL; vl = freeVarList(vl))

+ 22 - 22
VirtulMathCore/ofunc/src/vobject.c

@@ -4,9 +4,9 @@ typedef void (*base_opt)(LinkValue *, Result *, struct Inter *, VarList *var_lis
 
 void vobject_add_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
-    if (left->type == number && right->type == number)
+    if (left->type == V_num && right->type == V_num)
         makeNumberValue(left->data.num.num + right->data.num.num, 0, "vobject.add", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
-    else if(left->type == string && right->type == string){
+    else if(left->type == V_str && right->type == V_str){
         wchar_t *new_string = memWidecat(left->data.str.str, right->data.str.str, false, false);
         makeStringValue(new_string, 0, "vobject.add", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         memFree(new_string);
@@ -17,7 +17,7 @@ void vobject_add_base(LinkValue *belong, Result *result, struct Inter *inter, Va
 
 void vobject_sub_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
-    if (left->type == number && right->type == number)
+    if (left->type == V_num && right->type == V_num)
         makeNumberValue(left->data.num.num - right->data.num.num, 0, "vobject.sub", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     else
         setResultError(E_TypeException, CUL_ERROR(Sub), 0, "vobject.sub", true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
@@ -25,15 +25,15 @@ void vobject_sub_base(LinkValue *belong, Result *result, struct Inter *inter, Va
 
 void vobject_mul_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
-    if (left->type == number && right->type == number)
+    if (left->type == V_num && right->type == V_num)
         makeNumberValue(left->data.num.num * right->data.num.num, 0, "vobject.mul", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
-    else if(left->type == number && right->type == string) {
+    else if(left->type == V_num && right->type == V_str) {
         Value *tmp = left;
         left = right;
         right = tmp;
         goto mul_str;
     }
-    else if(left->type == string && right->type == number) mul_str: {
+    else if(left->type == V_str && right->type == V_num) mul_str: {
         wchar_t *new_string = memWidecpySelf(left->data.str.str, right->data.num.num);
         makeStringValue(new_string, 0, "vobject.mul", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         memFree(new_string);
@@ -44,7 +44,7 @@ void vobject_mul_base(LinkValue *belong, Result *result, struct Inter *inter, Va
 
 void vobject_div_base(LinkValue *belong, Result *result, struct Inter *inter, VarList *var_list, Value *left, Value *right) {
     setResultCore(result);
-    if (left->type == number && right->type == number) {
+    if (left->type == V_num && right->type == V_num) {
         lldiv_t div_result = lldiv(left->data.num.num, right->data.num.num);
         makeNumberValue(div_result.quot, 0, "vobject.div", CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     }
@@ -103,23 +103,23 @@ ResultType vobject_bool(OFFICAL_FUNCTIONSIG){
     }
     value = ap[0].value->value;
     switch (value->type) {
-        case number:
+        case V_num:
             result_ = value->data.num.num != 0;
             break;
-        case string:
+        case V_str:
             result_ = memWidelen(value->data.str.str) > 0;
             break;
-        case bool_:
+        case V_bool:
             result_ = value->data.bool_.bool_;
             break;
-        case pass_:
-        case none:
+        case V_ell:
+        case V_none:
             result_ = false;
             break;
-        case list:
+        case V_list:
             result_ = value->data.list.size > 0;
             break;
-        case dict:
+        case V_dict:
             result_ = value->data.dict.size > 0;
             break;
         default:
@@ -143,34 +143,34 @@ ResultType vobject_repo(OFFICAL_FUNCTIONSIG){
     value = ap[0].value->value;
 
     switch (value->type){
-        case number: {
+        case V_num: {
             char str[30] = {};
             snprintf(str, 30, "%lld", value->data.num.num);
             repo = memStrToWcs(str, false);
             break;
         }
-        case string:
+        case V_str:
             repo = memWidecpy(value->data.str.str);
             break;
-        case function: {
+        case V_func: {
             char str[30] = {};
-            snprintf(str, 30, "(function on %p)", value);
+            snprintf(str, 30, "(V_func on %p)", value);
             repo = memStrToWcs(str, false);
             break;
         }
-        case class: {
+        case V_class: {
             char str[30] = {};
-            snprintf(str, 30, "(class on %p)", value);
+            snprintf(str, 30, "(V_class on %p)", value);
             repo = memStrToWcs(str, false);
             break;
         }
-        case bool_:
+        case V_bool:
             if (value->data.bool_.bool_)
                 repo = memStrToWcs("true", false);
             else
                 repo = memStrToWcs("false", false);
             break;
-        case pass_:
+        case V_ell:
             repo = memStrToWcs("...", false);
             break;
         default:

+ 19 - 19
VirtulMathCore/parser/grammar.c

@@ -33,7 +33,7 @@ void freeParserMessage(ParserMessage *pm, bool self) {
 void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st) {
     int token_type;
     int save_enter = pm->tm->file->filter_data.enter;
-    char *command_message = global ? "ERROR from command list(get parserCommand)" : NULL;
+    char *command_message = global ? "ERROR from command V_list(get parserCommand)" : NULL;
     void *bak = NULL;
     fline line = 0;
     bool should_break = false;
@@ -75,7 +75,7 @@ void parserCommandList(PASERSSIGNATURE, bool global, bool is_one, Statement *st)
                 if (global) {
                     Token *tk = popNewToken(pm->tm);
                     freeToken(tk, true);
-                    syntaxError(pm, command_list_error, command_token->line, 1, "ERROR from parserCommand list(get stop)");
+                    syntaxError(pm, command_list_error, command_token->line, 1, "ERROR from parserCommand V_list(get stop)");
                     freeToken(command_token, true);
                 }
                 else{
@@ -535,7 +535,7 @@ void parserDo(PASERSSIGNATURE){
                 st->u.for_branch.first_do = do_code;
                 break;
             case MATHER_DEF:
-                if (!callChildStatement(CALLPASERSSIGNATURE, parserDef, FUNCTION, &st, "Don't get a function def after do"))
+                if (!callChildStatement(CALLPASERSSIGNATURE, parserDef, FUNCTION, &st, "Don't get a V_func def after do"))
                     goto error_;
                 st->u.set_function.first_do = do_code;
                 break;
@@ -1025,23 +1025,23 @@ void parserDef(PASERSSIGNATURE){
     long int line = delToken(pm);
 
     if (!callChildStatement(CALLPASERSSIGNATURE, parserBaseValue, BASEVALUE, &name_tmp,
-                            "Don't get a function/class name"))
+                            "Don't get a V_func/V_class name"))
         goto error_;
 
     if (!checkToken(pm, MATHER_LP))
         goto get_code;
     if (!parserParameter(CALLPASERSSIGNATURE, &pt, true, true, false, false, MATHER_COMMA, MATHER_ASSIGNMENT, type==MATHER_DEF ? MATHER_SEMICOLON : -1)) {
         lexEnter(pm, false);
-        syntaxError(pm, syntax_error, line, 1, "Don't get a function/class parameter");
+        syntaxError(pm, syntax_error, line, 1, "Don't get a V_func/V_class parameter");
         goto error_;
     }
     if (!checkToken(pm, MATHER_RP)) {
-        syntaxError(pm, syntax_error, line, 1, "Don't get a function/class ) after parameter");
+        syntaxError(pm, syntax_error, line, 1, "Don't get a V_func/V_class ) after parameter");
         goto error_;
     }
     get_code:
-    if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a function code", line)) {
-        syntaxError(pm, syntax_error, line, 1, "Don't get a function code");
+    if (!callParserCode(CALLPASERSSIGNATURE, &code_tmp, "Don't get a V_func code", line)) {
+        syntaxError(pm, syntax_error, line, 1, "Don't get a V_func code");
         goto error_;
     }
 
@@ -1119,7 +1119,7 @@ void parserOperation(PASERSSIGNATURE){
  */
 bool checkAssignmentLeft(PASERSSIGNATURE, Statement *left){
     if (left->type == call_function && !checkFormal(left->u.call_function.parameter)){
-        syntaxError(pm, syntax_error, left->line, 1, "Don't get success function definition from Assignment22");
+        syntaxError(pm, syntax_error, left->line, 1, "Don't get success V_func definition from Assignment22");
         return false;
     }
     return true;
@@ -1174,7 +1174,7 @@ void parserTuple(PASERSSIGNATURE){
         syntaxError(pm, syntax_error, line, 1, "Don't get tuple element");
         goto return_;
     }
-    st = makeTupleStatement(pt, value_tuple, pt->data.value->line, pm->file);
+    st = makeTupleStatement(pt, L_tuple, pt->data.value->line, pm->file);
     addStatementToken(TUPLE, st, pm);
 
     return_:
@@ -1345,9 +1345,9 @@ void parserCallBack(PASERSSIGNATURE){
  * | MATHER_VAR
  * | MATHER_LAMBDA parserParameter MATHER_COLON parserOperation
  * | MATHER_LP parserOperation MATHER_LP
- * | MATHER_LP parserOperation MATHER_LP -> list
+ * | MATHER_LP parserOperation MATHER_LP -> V_list
  * | MATHER_LP parserOperation MATHER_LP MATHER_VAR
- * | MATHER_LC parserParameter(dict) MATHER_LC
+ * | MATHER_LC parserParameter(V_dict) MATHER_LC
  */
 int getOperation(PASERSSIGNATURE, int right_type, Statement **st, char *name){
     *st = NULL;
@@ -1452,7 +1452,7 @@ void parserBaseValue(PASERSSIGNATURE){
                 goto return_;
             } else if (tmp == -1) {
                 freeToken(value_token, true);
-                syntaxError(pm, syntax_error, value_token->line, 1, "Don't get ] from list/var");
+                syntaxError(pm, syntax_error, value_token->line, 1, "Don't get ] from V_list/var");
                 goto return_;  // 优化goto return freeToken
             }
             if (MATHER_VAR == readBackToken(pm)) {
@@ -1462,12 +1462,12 @@ void parserBaseValue(PASERSSIGNATURE){
                 freeToken(var_token, false);
             } else {
                 if (tmp_st == NULL)
-                    st = makeTupleStatement(NULL, value_list, value_token->line, pm->file);
-                else if (tmp_st->type == base_list && tmp_st->u.base_list.type == value_tuple) {
-                    tmp_st->u.base_list.type = value_list;
+                    st = makeTupleStatement(NULL, L_list, value_token->line, pm->file);
+                else if (tmp_st->type == base_list && tmp_st->u.base_list.type == L_tuple) {
+                    tmp_st->u.base_list.type = L_list;
                     st = tmp_st;
                 } else
-                    st = makeTupleStatement(makeValueParameter(tmp_st), value_list, value_token->token_type, pm->file);
+                    st = makeTupleStatement(makeValueParameter(tmp_st), L_list, value_token->token_type, pm->file);
             }
             break;
         }
@@ -1494,13 +1494,13 @@ void parserBaseValue(PASERSSIGNATURE){
                                             MATHER_COLON, -1);
             if (!parser_status) {
                 freeToken(value_token, true);
-                syntaxError(pm, syntax_error, value_token->line, 1, "Don't get a dict parameter");
+                syntaxError(pm, syntax_error, value_token->line, 1, "Don't get a V_dict parameter");
                 goto return_;
             }
             if (!checkToken(pm, MATHER_RC)) {
                 freeToken(value_token, true);
                 freeParameter(pt, true);
-                syntaxError(pm, syntax_error, value_token->line, 1, "Don't get a } after dict");
+                syntaxError(pm, syntax_error, value_token->line, 1, "Don't get a } after V_dict");
                 goto return_;
             }
             st = makeBaseDictStatement(pt, value_token->line, pm->file);

+ 1 - 1
VirtulMathCore/parser/syntax.c

@@ -342,7 +342,7 @@ int getMatherStatus(LexFile *file, LexMathers *mathers) {
         strMatherMacro(MATHER_NULL, "null");
 
         strMatherMacro(MATHER_DEF, "def");
-        strMatherMacro(MATHER_CLASS, "class");
+        strMatherMacro(MATHER_CLASS, "V_class");
         strMatherMacro(MATHER_BLOCK, "block");
         strMatherMacro(MATHER_BREAK, "break");
         strMatherMacro(MATHER_CONTINUE, "continue");

+ 18 - 18
VirtulMathCore/src/__run.c

@@ -9,8 +9,8 @@ ResultType getBaseVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
     }
     if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_var.times, var_list, result, belong)))
         return result->type;
-    if (!isType(result->value->value, number)){
-        setResultErrorSt(E_TypeException, L"Variable operation got unsupported number of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (!isType(result->value->value, V_num)){
+        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return result->type;
     }
     *times = (int)result->value->value->data.num.num;
@@ -30,8 +30,8 @@ ResultType getBaseSVarInfo(wchar_t **name, int *times, INTER_FUNCTIONSIG){
     }
     if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.base_svar.times, var_list, result, belong)))
         return result->type;
-    if (!isType(result->value->value, number)){
-        setResultErrorSt(E_TypeException, L"Variable operation got unsupported number of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (!isType(result->value->value, V_num)){
+        setResultErrorSt(E_TypeException, L"Variable operation got unsupported V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return result->type;
     }
     *times = (int)result->value->value->data.num.num;
@@ -73,20 +73,20 @@ wchar_t *setNumVarName(vnum num, struct Inter *inter) {
 
 wchar_t *getNameFromValue(Value *value, struct Inter *inter) {
     switch (value->type){
-        case string:
+        case V_str:
             return setStrVarName(value->data.str.str, true, inter);
-        case number:
+        case V_num:
             return setNumVarName(value->data.num.num, inter);
-        case bool_:
+        case V_bool:
             if (value->data.bool_.bool_)
                 return memWidecat(inter->data.var_bool_prefix, L"true", false, false);
             else
                 return memWidecat(inter->data.var_bool_prefix, L"false", false, false);
-        case none:
+        case V_none:
             return memWidecpy(inter->data.var_none);
-        case pass_:
+        case V_ell:
             return memWidecpy(inter->data.var_pass);
-        case class:{
+        case V_class:{
             size_t len = memWidelen(inter->data.var_class_prefix) + 20;  // 预留20个字节给指针
             wchar_t *name = memWide(len);
             wchar_t *return_ = NULL;
@@ -191,11 +191,11 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
             break;
         case class_static_:
             tmp = makeValueArgument(func);
-            if (self->value->type != class) {
+            if (self->value->type != V_class) {
                 Inherit *ih = self->value->object.inherit;
                 self = NULL;
                 for (PASS; ih != NULL; ih = ih->next)  // 使用循环的方式检查
-                    if (ih->value->value->type == class) {
+                    if (ih->value->value->type == V_class) {
                         self = ih->value;
                         break;
                     }
@@ -217,7 +217,7 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
             break;
         case object_static_:
             tmp = makeValueArgument(func);
-            if (self->value->type != class){
+            if (self->value->type != V_class){
                 tmp->next = makeValueArgument(self);
                 tmp->next->next = *arg;
             }
@@ -226,11 +226,11 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
             *arg = tmp;
             break;
         case class_free_:
-            if (self->value->type != class){
+            if (self->value->type != V_class){
                 Inherit *ih = self->value->object.inherit;
                 self = NULL;
                 for (PASS; ih != NULL; ih = ih->next)  // 循环检查
-                    if (ih->value->value->type == class) {
+                    if (ih->value->value->type == V_class) {
                         self = ih->value;
                         break;
                     }
@@ -243,7 +243,7 @@ ResultType setFunctionArgument(Argument **arg, Argument **base, LinkValue *_func
             }  // 若无class则不对arg做任何调整
             break;
         case object_free_:
-            if (self->value->type != class) {
+            if (self->value->type != V_class) {
                 tmp = makeValueArgument(self);
                 tmp->next = *arg;
                 *arg = tmp;
@@ -410,7 +410,7 @@ bool checkBool(LinkValue *value, fline line, char *file, INTER_FUNCTIONSIG_NOT_S
         gc_addTmpLink(&_bool_->gc_status);
         callBackCore(_bool_, NULL, line, file, 0, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         gc_freeTmpLink(&_bool_->gc_status);
-        if (result->value->value->type != bool_)
+        if (result->value->value->type != V_bool)
             setResultError(E_TypeException, RETURN_ERROR(__bool__, bool), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         else
             return result->value->value->data.bool_.bool_;
@@ -432,7 +432,7 @@ wchar_t *getRepoStr(LinkValue *value, bool is_repo, fline line, char *file, INTE
         gc_freeTmpLink(&value->gc_status);
         if (!CHECK_RESULT(result))
             return NULL;
-        else if (result->value->value->type != string){
+        else if (result->value->value->type != V_str){
             setResultError(E_TypeException, OBJ_NOTSUPPORT(repo(str)), line, file, true, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
             return NULL;
         }

+ 2 - 2
VirtulMathCore/src/inter.c

@@ -55,9 +55,9 @@ Inter *makeInter(char *out, char *error_, char *in, LinkValue *belong) {
 void setBaseInterData(struct Inter *inter){
     inter->data.var_str_prefix = setName("str_");
     inter->data.var_num_prefix = setName("num_");
-    inter->data.var_none = setName("none");
+    inter->data.var_none = setName("V_none");
     inter->data.var_pass = setName("ellipsis");
-    inter->data.var_bool_prefix = setName("bool_");
+    inter->data.var_bool_prefix = setName("V_bool");
     inter->data.var_class_prefix = setName("class_");
     inter->data.var_object_prefix = setName("obj_");
     inter->data.object_init = setName("__init__");

+ 2 - 2
VirtulMathCore/src/parameter.c

@@ -621,7 +621,7 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
 
                 backup = call->next;
                 call->next = NULL;  // 断开Argument,只把value_arg部分传入makeListValue
-                makeListValue(base, 0, "sys", value_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+                makeListValue(base, 0, "sys", L_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
                 call->next = backup;
                 call = backup;
 
@@ -680,7 +680,7 @@ ResultType setParameterCore(fline line, char *file, Argument *call, Parameter *f
 Inherit *setFather(Argument *call) {
     Inherit *father_tmp = NULL;
     for (Argument *tmp = call; tmp != NULL && tmp->type == value_arg; tmp = tmp->next)
-        if (tmp->data.value->value->type == class) {
+        if (tmp->data.value->value->type == V_class) {
             father_tmp = connectInherit(father_tmp, makeInherit(tmp->data.value));
             father_tmp = connectInherit(father_tmp, copyInherit(tmp->data.value->value->object.inherit));
         }

+ 4 - 4
VirtulMathCore/src/runbranch.c

@@ -1,8 +1,8 @@
 #include "__run.h"
 
 static bool checkNumber(INTER_FUNCTIONSIG){
-    if (!isType(result->value->value, number)) {
-        setResultErrorSt(E_TypeException, L"Don't get a number of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (!isType(result->value->value, V_num)) {
+        setResultErrorSt(E_TypeException, L"Don't get a V_num of layers", true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return false;
     }
     return true;
@@ -968,8 +968,8 @@ ResultType gotoLabel(INTER_FUNCTIONSIG){
 
     if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.goto_.label, var_list, result, belong)))
         return result->type;
-    if (!isType(result->value->value, string)) {
-        setResultErrorSt(E_TypeException, ONLY_ACC(label name, string), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (!isType(result->value->value, V_str)) {
+        setResultErrorSt(E_TypeException, ONLY_ACC(label name, V_str), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return result->type;
     }
     label = memWidecpy(result->value->value->data.str.str);

+ 3 - 3
VirtulMathCore/src/runcall.c

@@ -299,11 +299,11 @@ static ResultType callVMFunction(LinkValue *function_value, Argument *arg, long
 ResultType callBackCore(LinkValue *function_value, Argument *arg, fline line, char *file, int pt_sep, INTER_FUNCTIONSIG_NOT_ST) {
     setResultCore(result);
     gc_addTmpLink(&function_value->gc_status);
-    if (function_value->value->type == function && function_value->value->data.function.type == vm_function)
+    if (function_value->value->type == V_func && function_value->value->data.function.type == vm_func)
         callVMFunction(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
-    else if (function_value->value->type == function && function_value->value->data.function.type == c_function)
+    else if (function_value->value->type == V_func && function_value->value->data.function.type == c_func)
         callCFunction(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
-    else if (function_value->value->type == class)
+    else if (function_value->value->type == V_class)
         callClass(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     else
         callObject(function_value, arg, line, file, pt_sep, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));

+ 4 - 4
VirtulMathCore/src/runfile.c

@@ -128,8 +128,8 @@ ResultType includeFile(INTER_FUNCTIONSIG) {
     if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.include_file.file, var_list, result, belong)))
         return result->type;
 
-    if (!isType(result->value->value, string)){
-        setResultErrorSt(E_TypeException, ONLY_ACC(include file dir, string), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (!isType(result->value->value, V_str)){
+        setResultErrorSt(E_TypeException, ONLY_ACC(include file dir, V_str), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         goto return_;
     }
 
@@ -186,8 +186,8 @@ ResultType importFileCore(char **path, char **split, int *status, INTER_FUNCTION
     if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st, var_list, result, belong)))
         return result->type;
 
-    if (!isType(result->value->value, string)) {
-        setResultErrorSt(E_ImportException, ONLY_ACC(include file dir, string), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+    if (!isType(result->value->value, V_str)) {
+        setResultErrorSt(E_ImportException, ONLY_ACC(include file dir, V_str), true, st, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
         return R_error;
     }
 

+ 6 - 6
VirtulMathCore/src/runoperation.c

@@ -78,7 +78,7 @@ ResultType pointOperation(INTER_FUNCTIONSIG) {
     LinkValue *left;
     VarList *object = NULL;
     setResultCore(result);
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.left, var_list, result, belong)) || result->value->value->type == none)
+    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.left, var_list, result, belong)) || result->value->value->type == V_none)
         return result->type;
     left = result->value;
     result->value = NULL;
@@ -117,7 +117,7 @@ ResultType delOperation(INTER_FUNCTIONSIG) {
 
 ResultType delCore(Statement *name, bool check_aut, INTER_FUNCTIONSIG_NOT_ST) {
     setResultCore(result);
-    if (name->type == base_list && name->u.base_list.type == value_tuple)
+    if (name->type == base_list && name->u.base_list.type == L_tuple)
         listDel(name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     else if (name->type == slice_)
         downDel(name, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
@@ -259,7 +259,7 @@ ResultType assCore(Statement *name, LinkValue *value, bool check_aut, bool setti
     setResultCore(result);
     gc_addTmpLink(&value->gc_status);
 
-    if (name->type == base_list && name->u.base_list.type == value_tuple)
+    if (name->type == base_list && name->u.base_list.type == L_tuple)
         listAss(name, value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     else if (name->type == slice_)
         downAss(name, value, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
@@ -329,7 +329,7 @@ ResultType listAss(Statement *name, LinkValue *value, INTER_FUNCTIONSIG_NOT_ST)
     setParameterCore(name->line, name->code_file, call, name->u.base_list.list, var_list, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     if (CHECK_RESULT(result)){
         freeResult(result);
-        makeListValue(call, name->line, name->code_file, value_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
+        makeListValue(call, name->line, name->code_file, L_tuple, CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     }
     return_:
     freeArgument(call, false);
@@ -528,12 +528,12 @@ ResultType setDefault(INTER_FUNCTIONSIG){
 }
 
 bool getLeftRightValue(Result *left, Result *right, INTER_FUNCTIONSIG){
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.left, var_list, result, belong)) || result->value->value->type == none)
+    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.left, var_list, result, belong)) || result->value->value->type == V_none)
         return true;
     *left = *result;
     setResultCore(result);
 
-    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.right, var_list, result, belong)) || result->value->value->type == none)
+    if (operationSafeInterStatement(CALL_INTER_FUNCTIONSIG(st->u.operation.right, var_list, result, belong)) || result->value->value->type == V_none)
         return true;
     *right = *result;
     setResultCore(result);

+ 26 - 26
VirtulMathCore/src/value.c

@@ -4,7 +4,7 @@ Value *makeObject(Inter *inter, VarList *object, VarList *out_var, Inherit *inhe
     Value *tmp, *list_tmp = inter->base;
     tmp = memCalloc(1, sizeof(Value));
     setGC(&tmp->gc_status);
-    tmp->type = object_;
+    tmp->type = V_obj;
     tmp->gc_next = NULL;
     if (inter->data.object != NULL && inherit == NULL)
         inherit = makeInherit(inter->data.object);
@@ -110,7 +110,7 @@ Value *makeCFunctionValue(OfficialFunction of, fline line, char *file, INTER_FUN
     if (!CHECK_RESULT(result))
         return NULL;
     tmp = result->value->value;
-    tmp->data.function.type = c_function;
+    tmp->data.function.type = c_func;
     tmp->data.function.of = of;
     tmp->data.function.function_data.pt_type = inter->data.default_pt_type;
     tmp->data.function.function_data.cls = belong;
@@ -141,7 +141,7 @@ LinkValue *makeCFunctionFromOf(OfficialFunction of, LinkValue *func, OfficialFun
     freeArgument(init_arg, true);
     freeArgument(arg, true);
 
-    return_->value->data.function.type = c_function;
+    return_->value->data.function.type = c_func;
     return_->value->data.function.of = of;
     return_->value->data.function.function_data.pt_type = inter->data.default_pt_type;
     return_->value->data.function.function_data.cls = belong;
@@ -157,14 +157,14 @@ Value *makeClassValue(VarList *var_list, Inter *inter, Inherit *father) {
     Value *tmp;
     VarList *new_var = copyVarList(var_list, false, inter);
     tmp = makeObject(inter, NULL, new_var, father);
-    tmp->type = class;
+    tmp->type = V_class;
     return tmp;
 }
 
 Value *makeListValue(Argument *arg, fline line, char *file, enum ListType type, INTER_FUNCTIONSIG_NOT_ST) {
     Value *tmp = NULL;
     setResultCore(result);
-    if (type == value_list)
+    if (type == L_list)
         callBackCore(inter->data.list, arg, line, file, 0,
                      CALL_INTER_FUNCTIONSIG_NOT_ST(var_list, result, belong));
     else
@@ -200,15 +200,15 @@ void freeValue(Value **value) {
     for (struct Inherit *tmp = free_value->object.inherit; tmp != NULL; tmp = freeInherit(tmp))
         PASS;
     switch (free_value->type) {
-        case string:
+        case V_str:
             memFree(free_value->data.str.str);
             break;
-        case function: {
+        case V_func: {
             freeParameter(free_value->data.function.pt, true);
             freeStatement(free_value->data.function.function);
             break;
         }
-        case list:
+        case V_list:
             memFree(free_value->data.list.list);
             break;
         default:
@@ -339,7 +339,7 @@ LinkValue *findBaseError(BaseErrorType type, Inter *inter){
 wchar_t *getErrorInfo(LinkValue *exc, int type, Inter *inter){
     wchar_t *str_name = type == 1 ? inter->data.object_name : inter->data.object_message;
     LinkValue *_info_ = findAttributes(str_name, false, exc, inter);
-    if (_info_ != NULL && _info_->value->type == string)
+    if (_info_ != NULL && _info_->value->type == V_str)
         return memWidecpy(_info_->value->data.str.str);
     else
         return type == 1 ? memWidecpy(L"Error Type: Unknown") : memWidecpy(L"Error Message: Unknown");
@@ -574,7 +574,7 @@ bool needDel(Value *object_value, Inter *inter) {
     if (_del_ == NULL)
         return false;
     type = _del_->value->data.function.function_data.pt_type;
-    if ((type == object_free_ || type == object_static_) && object_value->type == class)
+    if ((type == object_free_ || type == object_static_) && object_value->type == V_class)
         return false;
     if (_del_->belong == NULL || _del_->belong->value == object_value || checkAttribution(object_value, _del_->belong->value))
         return true;
@@ -612,19 +612,19 @@ bool checkAttribution(Value *self, Value *father){
 
 void printValue(Value *value, FILE *debug, bool print_father, bool print_in) {
     switch (value->type){
-        case number:
+        case V_num:
             fprintf(debug, "%lld", value->data.num.num);
             break;
-        case string:
+        case V_str:
             fprintf(debug, "%ls", value->data.str.str);
             break;
-        case function:
+        case V_func:
             if (print_father)
-                fprintf(debug, "function");
+                fprintf(debug, "V_func");
             else
-                fprintf(debug, "(function on %p)", value);
+                fprintf(debug, "(V_func on %p)", value);
             break;
-        case list:
+        case V_list:
             if (print_in){
                 fprintf(debug, "[");
                 for (int i = 0; i < value->data.list.size; i++) {
@@ -634,9 +634,9 @@ void printValue(Value *value, FILE *debug, bool print_father, bool print_in) {
                 }
                 fprintf(debug, " ]", NULL);
             } else
-                fprintf(debug, "[list]", NULL);
+                fprintf(debug, "[V_list]", NULL);
             break;
-        case dict:
+        case V_dict:
             if (print_in){
                 Var *tmp = NULL;
                 bool print_comma = false;
@@ -654,30 +654,30 @@ void printValue(Value *value, FILE *debug, bool print_father, bool print_in) {
                 }
                 fprintf(debug, " }", NULL);
             } else
-                fprintf(debug, "[dict]", NULL);
+                fprintf(debug, "[V_dict]", NULL);
             break;
-        case none:
+        case V_none:
             fprintf(debug, "(null)", NULL);
             break;
-        case class:
+        case V_class:
             if (print_father)
-                fprintf(debug, "class");
+                fprintf(debug, "V_class");
             else
-                fprintf(debug, "(class on %p)", value);
+                fprintf(debug, "(V_class on %p)", value);
             break;
-        case object_:
+        case V_obj:
             if (print_father)
                 fprintf(debug, "object");
             else
                 fprintf(debug, "(object on %p)", value);
             break;
-        case bool_:
+        case V_bool:
             if (value->data.bool_.bool_)
                 fprintf(debug, "true");
             else
                 fprintf(debug, "false");
             break;
-        case pass_:
+        case V_ell:
             fprintf(debug, "...");
             break;
         default:

+ 1 - 1
VirtulMathCore/src/var.c

@@ -142,7 +142,7 @@ vnum findDefault(DefaultVar *base, wchar_t *name) {
  * @param key
  * @return
  */
-vhashn time33(wchar_t *key){ // hash function
+vhashn time33(wchar_t *key){ // hash V_func
     vhashn hash = 5381;
     while(*key)
         hash += (hash << (vhashn)5) + (*key++);