浏览代码

设置public和protect关键词

SongZihuan 5 年之前
父节点
当前提交
f17644319b
共有 8 个文件被更改,包括 337 次插入258 次删除
  1. 1 0
      README.md
  2. 103 103
      inter/cfunc.c
  3. 155 132
      inter/interpreter.c
  4. 23 7
      inter/interpreter.h
  5. 18 7
      inter/var.c
  6. 2 0
      paser/lexical.c
  7. 32 8
      paser/syntax.c
  8. 3 1
      paser/token.h

+ 1 - 0
README.md

@@ -62,5 +62,6 @@ return x n  函数返回值x,返回n层
 * 设置了setup函数,函数可以使用setup关键词进行初始化。
 * 设置了setup函数,函数可以使用setup关键词进行初始化。
 * 设置inline函数,函数执行的时候将不会产生单独的``var_list``,也不会记录``var_list``。
 * 设置inline函数,函数执行的时候将不会产生单独的``var_list``,也不会记录``var_list``。
 * 设置对None的point运算均为None
 * 设置对None的point运算均为None
+* 设置了变量访问权限:protect [受到保护的变量] 和public [公开变量]
 ## 关于GWARF
 ## 关于GWARF
 最后更新时间 : 2020年05月05日 广州
 最后更新时间 : 2020年05月05日 广州

+ 103 - 103
inter/cfunc.c

@@ -49,7 +49,7 @@ GWARF_value to_object(GWARF_value value, var_list *the_var){  // 把GWARF_value
     if((value.type == CLASS_value) || (value.type == OBJECT_value) || (value.type == FUNC_value) || (value.type == NULL_value)){  // 可以直接返回
     if((value.type == CLASS_value) || (value.type == OBJECT_value) || (value.type == FUNC_value) || (value.type == NULL_value)){  // 可以直接返回
         return value;
         return value;
     }
     }
-    GWARF_result func_result;
+    GWARF_result func_result = GWARF_result_reset;
     func_result.u = statement_end;
     func_result.u = statement_end;
     func_result.value.type = NULL_value;
     func_result.value.type = NULL_value;
     func_result.value.value.int_value = 0;
     func_result.value.value.int_value = 0;
@@ -98,7 +98,7 @@ GWARF_value to_object(GWARF_value value, var_list *the_var){  // 把GWARF_value
 
 
 
 
 GWARF_value to_tuple(GWARF_value value, var_list *the_var){  // 把GWARF_value封装成objct
 GWARF_value to_tuple(GWARF_value value, var_list *the_var){  // 把GWARF_value封装成objct
-    GWARF_result func_result;
+    GWARF_result func_result = GWARF_result_reset;
     func_result.u = statement_end;
     func_result.u = statement_end;
     var *tmp;
     var *tmp;
     tmp = find_var(the_var, 0, "tuple");
     tmp = find_var(the_var, 0, "tuple");
@@ -113,7 +113,7 @@ GWARF_value to_tuple(GWARF_value value, var_list *the_var){  // 把GWARF_value
 
 
 
 
 GWARF_result get_object(parameter *tmp_s, char *name, var_list *the_var){  // 生成一个object
 GWARF_result get_object(parameter *tmp_s, char *name, var_list *the_var){  // 生成一个object
-    GWARF_result func_result;
+    GWARF_result func_result = GWARF_result_reset;
     func_result.u = statement_end;
     func_result.u = statement_end;
     func_result.value.type = NULL_value;
     func_result.value.type = NULL_value;
     func_result.value.value.int_value = 0;
     func_result.value.value.int_value = 0;
@@ -129,8 +129,8 @@ GWARF_result get_object(parameter *tmp_s, char *name, var_list *the_var){  // 
 
 
 
 
 GWARF_result to_error(char *error_info, char *error_type, var_list *the_var){  // 把GWARF_value封装成error
 GWARF_result to_error(char *error_info, char *error_type, var_list *the_var){  // 把GWARF_value封装成error
-    GWARF_result func_result, return_result;
-    GWARF_value tmp_value;
+    GWARF_result func_result, return_result = GWARF_result_reset;
+    GWARF_value tmp_value = GWARF_value_reset;
 
 
     tmp_value.type = STRING_value;
     tmp_value.type = STRING_value;
     tmp_value.value.string = error_info;
     tmp_value.value.string = error_info;
@@ -156,7 +156,7 @@ GWARF_result to_error(char *error_info, char *error_type, var_list *the_var){  /
 
 
 
 
 void login_official_func(int type, int is_class, var_list *the_var, char *name, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *)){  // 注册单个official func
 void login_official_func(int type, int is_class, var_list *the_var, char *name, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *)){  // 注册单个official func
-    GWARF_result func_value;
+    GWARF_result func_value = GWARF_result_reset;
     func *func_tmp = malloc(sizeof(func));
     func *func_tmp = malloc(sizeof(func));
 
 
     func_tmp->done = NULL;
     func_tmp->done = NULL;
@@ -170,7 +170,7 @@ void login_official_func(int type, int is_class, var_list *the_var, char *name,
 
 
     func_value.value.type = FUNC_value;
     func_value.value.type = FUNC_value;
     func_value.value.value.func_value = func_tmp;
     func_value.value.value.func_value = func_tmp;
-    assignment_func(name, func_value, the_var, 0);  // 注册函数到指定的位置
+    assignment_func(name, func_value, the_var, 0, auto_public);  // 注册函数到指定的位置
 }
 }
 
 
 void login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *)){
 void login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *)){
@@ -188,7 +188,7 @@ void login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *
 
 
 // global 全局内置函数解析器
 // global 全局内置函数解析器
 GWARF_result official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){
 GWARF_result official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
     switch (the_func->official_func)
     switch (the_func->official_func)
@@ -257,13 +257,13 @@ GWARF_result official_func(func *the_func, parameter *tmp_s, var_list *the_var,
 class_object *object_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *)){  // 内置对象继承的类
 class_object *object_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *)){  // 内置对象继承的类
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, NULL);
     class_object *class_tmp = make_object(the_var, NULL);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("object", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("object", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
 
 
@@ -279,7 +279,7 @@ class_object *object_login_official(var_list *the_var, GWARF_result (*paser)(fun
 }
 }
 
 
 GWARF_result object_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
 GWARF_result object_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -318,12 +318,12 @@ class_object *make_object(var_list *the_var, var_list *father_var_list){
 class_object *BaseException_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *BaseException_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("BaseException", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("BaseException", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -338,7 +338,7 @@ class_object *BaseException_login_official(var_list *the_var, GWARF_result (*pas
 }
 }
 
 
 GWARF_result BaseException_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
 GWARF_result BaseException_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -364,7 +364,7 @@ GWARF_result BaseException_official_func(func *the_func, parameter *tmp_s, var_l
                 goto return_result;
                 goto return_result;
             }
             }
             tmp.value = to_str(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
             tmp.value = to_str(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-            assignment_func("ErrorInfo", tmp, login_var, 0);  // 注册到self -> ErrorInfo
+            assignment_func("ErrorInfo", tmp, login_var, 0, auto_public);  // 注册到self -> ErrorInfo
             return_value.u = statement_end;  // __init__没有return
             return_value.u = statement_end;  // __init__没有return
             break;
             break;
         }
         }
@@ -377,13 +377,13 @@ GWARF_result BaseException_official_func(func *the_func, parameter *tmp_s, var_l
 class_object *Exception_login_official(var_list *the_var, var_list *father_var_list){
 class_object *Exception_login_official(var_list *the_var, var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("Exception", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("Exception", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
     return class_tmp;
     return class_tmp;
 }
 }
@@ -391,13 +391,13 @@ class_object *Exception_login_official(var_list *the_var, var_list *father_var_l
 class_object *AssertException_login_official(var_list *the_var, var_list *father_var_list){
 class_object *AssertException_login_official(var_list *the_var, var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("AssertException", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("AssertException", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
     return class_tmp;
     return class_tmp;
 }
 }
@@ -405,13 +405,13 @@ class_object *AssertException_login_official(var_list *the_var, var_list *father
 class_object *NameException_login_official(var_list *the_var, var_list *father_var_list){
 class_object *NameException_login_official(var_list *the_var, var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("NameException", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("NameException", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
     return class_tmp;
     return class_tmp;
 }
 }
@@ -419,13 +419,13 @@ class_object *NameException_login_official(var_list *the_var, var_list *father_v
 class_object *IterException_login_official(var_list *the_var, var_list *father_var_list){
 class_object *IterException_login_official(var_list *the_var, var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("IterException", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("IterException", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
     return class_tmp;
     return class_tmp;
 }
 }
@@ -433,13 +433,13 @@ class_object *IterException_login_official(var_list *the_var, var_list *father_v
 class_object *AssignmentException_login_official(var_list *the_var, var_list *father_var_list){
 class_object *AssignmentException_login_official(var_list *the_var, var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("AssignmentException", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("AssignmentException", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
     return class_tmp;
     return class_tmp;
 }
 }
@@ -447,13 +447,13 @@ class_object *AssignmentException_login_official(var_list *the_var, var_list *fa
 class_object *gobject_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){  // 内置对象继承的类
 class_object *gobject_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){  // 内置对象继承的类
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
     
     
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("gobject", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("gobject", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -470,7 +470,7 @@ class_object *gobject_login_official(var_list *the_var, GWARF_result (*paser)(fu
 }
 }
 
 
 GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
 GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -486,10 +486,10 @@ GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *t
     switch (the_func->official_func)
     switch (the_func->official_func)
     {
     {
         case __init__func:{  // printf something
         case __init__func:{  // printf something
-            GWARF_result tmp;
+            GWARF_result tmp = GWARF_result_reset;
             tmp.value.type = INT_value;
             tmp.value.type = INT_value;
             tmp.value.value.int_value = 0;
             tmp.value.value.int_value = 0;
-            assignment_func("value", tmp, login_var, 0);  // 注册到self
+            assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
             return_value.u = statement_end;  // __init__没有return
             return_value.u = statement_end;  // __init__没有return
             break;
             break;
         }
         }
@@ -919,7 +919,7 @@ GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *t
             break;
             break;
         }
         }
         case __negative__func:{
         case __negative__func:{
-            GWARF_result left_tmp;
+            GWARF_result left_tmp = GWARF_result_reset;
             var *tmp = find_var(login_var, 0, "value");
             var *tmp = find_var(login_var, 0, "value");
             if(tmp != NULL){
             if(tmp != NULL){
                 left_tmp.value = tmp->value;
                 left_tmp.value = tmp->value;
@@ -1187,7 +1187,7 @@ GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *t
             break;
             break;
         }
         }
         case __bitnot__func:{
         case __bitnot__func:{
-            GWARF_result left_tmp;
+            GWARF_result left_tmp = GWARF_result_reset;
             var *tmp = find_var(login_var, 0, "value");
             var *tmp = find_var(login_var, 0, "value");
             if(tmp != NULL){
             if(tmp != NULL){
                 left_tmp.value = tmp->value;
                 left_tmp.value = tmp->value;
@@ -1208,12 +1208,12 @@ GWARF_result gobject_official_func(func *the_func, parameter *tmp_s, var_list *t
 class_object *int_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *int_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("int", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("int", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -1228,7 +1228,7 @@ class_object *int_login_official(var_list *the_var, GWARF_result (*paser)(func *
 }
 }
 
 
 GWARF_result int_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
 GWARF_result int_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -1255,7 +1255,7 @@ GWARF_result int_official_func(func *the_func, parameter *tmp_s, var_list *the_v
             }
             }
             GWARF_value base_the_var = tmp.value;  // 只有一个参数
             GWARF_value base_the_var = tmp.value;  // 只有一个参数
             tmp.value = to_int(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
             tmp.value = to_int(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-            assignment_func("value", tmp, login_var, 0);  // 注册到self
+            assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
             return_value.u = statement_end;  // __init__没有return
             return_value.u = statement_end;  // __init__没有return
             break;
             break;
         }
         }
@@ -1267,7 +1267,7 @@ GWARF_result int_official_func(func *the_func, parameter *tmp_s, var_list *the_v
                 object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);  // 生成实例
                 object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);  // 生成实例
 
 
                 // 执行__init__
                 // 执行__init__
-                GWARF_result self_value;
+                GWARF_result self_value = GWARF_result_reset;
                 var *tmp = find_var(login_var, 0, "value");
                 var *tmp = find_var(login_var, 0, "value");
                 if(tmp != NULL){
                 if(tmp != NULL){
                     self_value.value = to_int(tmp->value, out_var);
                     self_value.value = to_int(tmp->value, out_var);
@@ -1276,7 +1276,7 @@ GWARF_result int_official_func(func *the_func, parameter *tmp_s, var_list *the_v
                     self_value.value.type = INT_value;
                     self_value.value.type = INT_value;
                     self_value.value.value.int_value = 0;
                     self_value.value.value.int_value = 0;
                 }
                 }
-                assignment_func("value", self_value, object_tmp->the_var, 0);  // 注册到新的object
+                assignment_func("value", self_value, object_tmp->the_var, 0, auto_public);  // 注册到新的object
 
 
                 return_value.value.type = OBJECT_value;
                 return_value.value.type = OBJECT_value;
                 return_value.value.value.object_value = object_tmp;
                 return_value.value.value.object_value = object_tmp;
@@ -1298,7 +1298,7 @@ GWARF_value to_int(GWARF_value value, var_list *the_var){
         return value;  // 直接返回数据
         return value;  // 直接返回数据
     }
     }
 
 
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = INT_value;
     return_number.type = INT_value;
 
 
     if(value.type == OBJECT_value){  // 调用__value__方法
     if(value.type == OBJECT_value){  // 调用__value__方法
@@ -1325,13 +1325,13 @@ GWARF_value to_int(GWARF_value value, var_list *the_var){
 class_object *double_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *double_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("double", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("double", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -1346,7 +1346,7 @@ class_object *double_login_official(var_list *the_var, GWARF_result (*paser)(fun
 }
 }
 
 
 GWARF_result double_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
 GWARF_result double_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -1372,7 +1372,7 @@ GWARF_result double_official_func(func *the_func, parameter *tmp_s, var_list *th
                 goto return_result;
                 goto return_result;
             }
             }
             tmp.value = to_double(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
             tmp.value = to_double(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-            assignment_func("value", tmp, login_var, 0);  // 注册到self
+            assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
             return_value.u = statement_end;  // __init__没有return
             return_value.u = statement_end;  // __init__没有return
             break;
             break;
         }
         }
@@ -1384,7 +1384,7 @@ GWARF_result double_official_func(func *the_func, parameter *tmp_s, var_list *th
                 object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);  // 生成实例
                 object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);  // 生成实例
 
 
                 // 执行__init__
                 // 执行__init__
-                GWARF_result self_value;
+                GWARF_result self_value = GWARF_result_reset;
                 var *tmp = find_var(login_var, 0, "value");
                 var *tmp = find_var(login_var, 0, "value");
                 if(tmp != NULL){
                 if(tmp != NULL){
                     self_value.value = to_int(tmp->value, out_var);
                     self_value.value = to_int(tmp->value, out_var);
@@ -1393,7 +1393,7 @@ GWARF_result double_official_func(func *the_func, parameter *tmp_s, var_list *th
                     self_value.value.type = NUMBER_value;
                     self_value.value.type = NUMBER_value;
                     self_value.value.value.double_value = 0;
                     self_value.value.value.double_value = 0;
                 }
                 }
-                assignment_func("value", self_value, object_tmp->the_var, 0);  // 注册到新的object
+                assignment_func("value", self_value, object_tmp->the_var, 0, auto_public);  // 注册到新的object
 
 
                 return_value.value.type = OBJECT_value;
                 return_value.value.type = OBJECT_value;
                 return_value.value.value.object_value = object_tmp;
                 return_value.value.value.object_value = object_tmp;
@@ -1415,7 +1415,7 @@ GWARF_value to_double(GWARF_value value, var_list *the_var){
         return value;  // 直接返回数据
         return value;  // 直接返回数据
     }
     }
 
 
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = NUMBER_value;
     return_number.type = NUMBER_value;
 
 
     if(value.type == OBJECT_value){  // 调用__value__方法
     if(value.type == OBJECT_value){  // 调用__value__方法
@@ -1441,13 +1441,13 @@ GWARF_value to_double(GWARF_value value, var_list *the_var){
 class_object *str_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *str_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("str", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("str", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -1462,7 +1462,7 @@ class_object *str_login_official(var_list *the_var, GWARF_result (*paser)(func *
 }
 }
 
 
 GWARF_result str_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
 GWARF_result str_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -1488,7 +1488,7 @@ GWARF_result str_official_func(func *the_func, parameter *tmp_s, var_list *the_v
                 goto return_result;
                 goto return_result;
             }
             }
             tmp.value = to_str(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
             tmp.value = to_str(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-            assignment_func("value", tmp, login_var, 0);  // 注册到self
+            assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
             return_value.u = statement_end;  // __init__没有return
             return_value.u = statement_end;  // __init__没有return
             break;
             break;
         }
         }
@@ -1504,7 +1504,7 @@ GWARF_value to_str(GWARF_value value, var_list *the_var){
         return value;  // 直接返回数据
         return value;  // 直接返回数据
     }
     }
 
 
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = STRING_value;
     return_number.type = STRING_value;
 
 
     if(value.type == OBJECT_value){  // 调用__value__方法
     if(value.type == OBJECT_value){  // 调用__value__方法
@@ -1551,7 +1551,7 @@ GWARF_value to_str(GWARF_value value, var_list *the_var){
 
 
 // dict key 带有类型的前缀
 // dict key 带有类型的前缀
 GWARF_value to_str_dict(GWARF_value value, var_list *the_var){
 GWARF_value to_str_dict(GWARF_value value, var_list *the_var){
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = STRING_value;
     return_number.type = STRING_value;
 
 
     if((value.type == STRING_value)){
     if((value.type == STRING_value)){
@@ -1630,7 +1630,7 @@ char *del_start(char *str, char *start){
 }
 }
 
 
 GWARF_value key_to_str(char *key){  // 复原key
 GWARF_value key_to_str(char *key){  // 复原key
-    GWARF_value return_value;
+    GWARF_value return_value = GWARF_value_reset;
     if(start_with(key, "str_")){
     if(start_with(key, "str_")){
         return_value.type = STRING_value;
         return_value.type = STRING_value;
         return_value.value.string = del_start(key, "str_");
         return_value.value.string = del_start(key, "str_");
@@ -1661,13 +1661,13 @@ GWARF_value key_to_str(char *key){  // 复原key
 class_object *bool_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *bool_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("bool", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("bool", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -1682,7 +1682,7 @@ class_object *bool_login_official(var_list *the_var, GWARF_result (*paser)(func
 }
 }
 
 
 GWARF_result bool_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
 GWARF_result bool_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -1708,7 +1708,7 @@ GWARF_result bool_official_func(func *the_func, parameter *tmp_s, var_list *the_
                 goto return_result;
                 goto return_result;
             }
             }
             tmp.value = to_bool_(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
             tmp.value = to_bool_(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-            assignment_func("value", tmp, login_var, 0);  // 注册到self
+            assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
             return_value.u = statement_end;  // __init__没有return
             return_value.u = statement_end;  // __init__没有return
             break;
             break;
         }
         }
@@ -1720,7 +1720,7 @@ GWARF_result bool_official_func(func *the_func, parameter *tmp_s, var_list *the_
                 object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);  // 生成实例
                 object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);  // 生成实例
 
 
                 // 执行__init__
                 // 执行__init__
-                GWARF_result self_value;
+                GWARF_result self_value = GWARF_result_reset;
                 var *tmp = find_var(login_var, 0, "value");
                 var *tmp = find_var(login_var, 0, "value");
                 if(tmp != NULL){
                 if(tmp != NULL){
                     self_value.value = to_bool_(tmp->value, out_var);
                     self_value.value = to_bool_(tmp->value, out_var);
@@ -1729,7 +1729,7 @@ GWARF_result bool_official_func(func *the_func, parameter *tmp_s, var_list *the_
                     self_value.value.type = BOOL_value;
                     self_value.value.type = BOOL_value;
                     self_value.value.value.double_value = false;
                     self_value.value.value.double_value = false;
                 }
                 }
-                assignment_func("value", self_value, object_tmp->the_var, 0);  // 注册到新的object
+                assignment_func("value", self_value, object_tmp->the_var, 0, auto_public);  // 注册到新的object
 
 
                 return_value.value.type = OBJECT_value;
                 return_value.value.type = OBJECT_value;
                 return_value.value.value.object_value = object_tmp;
                 return_value.value.value.object_value = object_tmp;
@@ -1751,7 +1751,7 @@ GWARF_value to_bool_(GWARF_value value, var_list *the_var){
         return value;  // 直接返回数据
         return value;  // 直接返回数据
     }
     }
 
 
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = BOOL_value;
     return_number.type = BOOL_value;
 
 
     if(value.type == OBJECT_value){  // 调用__value__方法
     if(value.type == OBJECT_value){  // 调用__value__方法
@@ -1766,13 +1766,13 @@ GWARF_value to_bool_(GWARF_value value, var_list *the_var){
 class_object *tuple_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *tuple_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("tuple", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("tuple", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -1787,7 +1787,7 @@ class_object *tuple_login_official(var_list *the_var, GWARF_result (*paser)(func
 }
 }
 
 
 GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
 GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -1804,14 +1804,14 @@ GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the
     {
     {
         case __init__func:{  // printf something
         case __init__func:{  // printf something
             if(tmp_s == NULL){  // 生成空列表
             if(tmp_s == NULL){  // 生成空列表
-                GWARF_result tmp_result;
-                GWARF_value list_tmp;
+                GWARF_result tmp_result = GWARF_result_reset;
+                GWARF_value list_tmp = GWARF_value_reset;
                 list_tmp.type = LIST_value;
                 list_tmp.type = LIST_value;
                 list_tmp.value.list_value = malloc(sizeof(the_list));
                 list_tmp.value.list_value = malloc(sizeof(the_list));
                 list_tmp.value.list_value->index = 0;
                 list_tmp.value.list_value->index = 0;
                 list_tmp.value.list_value->list_value = malloc((size_t)0);
                 list_tmp.value.list_value->list_value = malloc((size_t)0);
                 tmp_result.value = list_tmp;
                 tmp_result.value = list_tmp;
-                assignment_func("value", tmp_result, login_var, 0);  // 注册到self
+                assignment_func("value", tmp_result, login_var, 0, auto_public);  // 注册到self
                 return_value.u = statement_end;  // __init__没有return
                 return_value.u = statement_end;  // __init__没有return
             }
             }
             else if(tmp_s->next == NULL){  // 只有一个参数
             else if(tmp_s->next == NULL){  // 只有一个参数
@@ -1825,22 +1825,22 @@ GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the
                     goto return_result;
                     goto return_result;
                 }
                 }
                 tmp.value = to_list(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
                 tmp.value = to_list(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-                assignment_func("value", tmp, login_var, 0);  // 注册到self
+                assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
                 return_value.u = statement_end;  // __init__没有return
                 return_value.u = statement_end;  // __init__没有return
             }
             }
             else{
             else{
-                GWARF_result tmp_result;
-                GWARF_value list_tmp;
+                GWARF_result tmp_result = GWARF_result_reset;
+                GWARF_value list_tmp = GWARF_value_reset;
                 list_tmp.type = LIST_value;
                 list_tmp.type = LIST_value;
                 list_tmp.value.list_value = parameter_to_list(tmp_s, out_var).value.list_value;
                 list_tmp.value.list_value = parameter_to_list(tmp_s, out_var).value.list_value;
                 tmp_result.value = list_tmp;
                 tmp_result.value = list_tmp;
-                assignment_func("value", tmp_result, login_var, 0);  // 注册到self
+                assignment_func("value", tmp_result, login_var, 0, auto_public);  // 注册到self
                 return_value.u = statement_end;  // __init__没有return
                 return_value.u = statement_end;  // __init__没有return
             }
             }
-            GWARF_result iter_value;
+            GWARF_result iter_value = GWARF_result_reset;
             iter_value.value.type = INT_value;
             iter_value.value.type = INT_value;
             iter_value.value.value.int_value = 0;
             iter_value.value.value.int_value = 0;
-            assignment_func("iter_value", iter_value, login_var, 0);  // 注册到self
+            assignment_func("iter_value", iter_value, login_var, 0, auto_public);  // 注册到self
             break;
             break;
         }
         }
         case __len__func:{  // return index
         case __len__func:{  // return index
@@ -1850,10 +1850,10 @@ GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the
             break;
             break;
         }
         }
         case __iter__func:{  // return self
         case __iter__func:{  // return self
-            GWARF_result iter_value;
+            GWARF_result iter_value = GWARF_result_reset;
             iter_value.value.type = INT_value;
             iter_value.value.type = INT_value;
             iter_value.value.value.int_value = 0;
             iter_value.value.value.int_value = 0;
-            assignment_func("iter_value", iter_value, login_var, 0);  // 注册到self
+            assignment_func("iter_value", iter_value, login_var, 0, auto_public);  // 注册到self
 
 
             return_value.value = *(father.father);
             return_value.value = *(father.father);
             break;
             break;
@@ -1876,10 +1876,10 @@ GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the
             }
             }
             else{
             else{
                 return_value.value = tmp->value.value.list_value->list_value[iter_index];
                 return_value.value = tmp->value.value.list_value->list_value[iter_index];
-                GWARF_result iter_value;
+                GWARF_result iter_value = GWARF_result_reset;
                 iter_value.value.type = INT_value;
                 iter_value.value.type = INT_value;
                 iter_value.value.value.int_value = iter_index + 1;
                 iter_value.value.value.int_value = iter_index + 1;
-                assignment_func("iter_value", iter_value, login_var, 0);  // 注册到self
+                assignment_func("iter_value", iter_value, login_var, 0, auto_public);  // 注册到self
             }
             }
 
 
             break;
             break;
@@ -1962,13 +1962,13 @@ GWARF_result tuple_official_func(func *the_func, parameter *tmp_s, var_list *the
 class_object *list_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *list_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("list", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("list", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -1983,7 +1983,7 @@ class_object *list_login_official(var_list *the_var, GWARF_result (*paser)(func
 }
 }
 
 
 GWARF_result list_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
 GWARF_result list_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -2046,7 +2046,7 @@ GWARF_value to_dict(GWARF_value value, var_list *the_var){
         return value;  // 直接返回数据
         return value;  // 直接返回数据
     }
     }
 
 
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = DICT_value;
     return_number.type = DICT_value;
 
 
     if(value.type == OBJECT_value){  // 调用__value__方法
     if(value.type == OBJECT_value){  // 调用__value__方法
@@ -2070,7 +2070,7 @@ GWARF_value to_list(GWARF_value value, var_list *the_var){
         return value;  // 直接返回数据
         return value;  // 直接返回数据
     }
     }
 
 
-    GWARF_value return_number;
+    GWARF_value return_number = GWARF_value_reset;
     return_number.type = LIST_value;
     return_number.type = LIST_value;
 
 
     if(value.type == OBJECT_value){  // 调用__value__方法
     if(value.type == OBJECT_value){  // 调用__value__方法
@@ -2086,12 +2086,12 @@ GWARF_value to_list(GWARF_value value, var_list *the_var){
 }
 }
 
 
 GWARF_value parameter_to_list(parameter *tmp_s, var_list *the_var){  // 把parameter转换为list
 GWARF_value parameter_to_list(parameter *tmp_s, var_list *the_var){  // 把parameter转换为list
-    GWARF_value return_list;
+    GWARF_value return_list = GWARF_value_reset;
     return_list.type = LIST_value;
     return_list.type = LIST_value;
     return_list.value.list_value = malloc(sizeof(the_list));
     return_list.value.list_value = malloc(sizeof(the_list));
     return_list.value.list_value->list_value = malloc(0);
     return_list.value.list_value->list_value = malloc(0);
     int index = 0;
     int index = 0;
-    GWARF_result result_tmp;
+    GWARF_result result_tmp = GWARF_result_reset;
     while(1){
     while(1){
         if(tmp_s == NULL){
         if(tmp_s == NULL){
             break;
             break;
@@ -2130,7 +2130,7 @@ GWARF_value parameter_to_list(parameter *tmp_s, var_list *the_var){  // 把param
 }
 }
 
 
 GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var){  // 把parameter转换为list
 GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var){  // 把parameter转换为list
-    GWARF_value return_dict;
+    GWARF_value return_dict = GWARF_value_reset;
     return_dict.type = DICT_value;
     return_dict.type = DICT_value;
     return_dict.value.dict_value = malloc(sizeof(the_dict));
     return_dict.value.dict_value = malloc(sizeof(the_dict));
     return_dict.value.dict_value->index = 0;
     return_dict.value.dict_value->index = 0;
@@ -2140,7 +2140,7 @@ GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var){  // 把param
     return_dict.value.dict_value->name_list->next = NULL;
     return_dict.value.dict_value->name_list->next = NULL;
 
 
     int index = 0;
     int index = 0;
-    GWARF_result result_tmp;
+    GWARF_result result_tmp = GWARF_result_reset;
     var_list *tmp_var_list = make_var_base(return_dict.value.dict_value->dict_value);
     var_list *tmp_var_list = make_var_base(return_dict.value.dict_value->dict_value);
     puts("[tag 2]");
     puts("[tag 2]");
     while(1){
     while(1){
@@ -2158,7 +2158,7 @@ GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var){  // 把param
                     goto next;  // goto return_value;
                     goto next;  // goto return_value;
                 }
                 }
 
 
-                GWARF_result get;  // 不会和下面发生重复计算
+                GWARF_result get = GWARF_result_reset;  // 不会和下面发生重复计算
                 var_list *call_var = tmp.value.value.object_value->the_var;
                 var_list *call_var = tmp.value.value.object_value->the_var;
 
 
                 var *__down__tmp = find_var(call_var, 0, "__down__");
                 var *__down__tmp = find_var(call_var, 0, "__down__");
@@ -2199,7 +2199,7 @@ GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var){  // 把param
             GWARF_result key_tmp = traverse(tmp_s->u.var, the_var, 0);
             GWARF_result key_tmp = traverse(tmp_s->u.var, the_var, 0);
             key = to_str_dict(key_tmp.value, the_var).value.string;
             key = to_str_dict(key_tmp.value, the_var).value.string;
         }
         }
-        login_node(key, result_tmp.value, return_dict.value.dict_value->dict_value);  // 插入
+        login_node(key, result_tmp.value, return_dict.value.dict_value->dict_value, public);  // 插入
         dict_key *tmp_dict_name = return_dict.value.dict_value->name_list;
         dict_key *tmp_dict_name = return_dict.value.dict_value->name_list;
         while (1){  // 迭代
         while (1){  // 迭代
             if(!strcmp(tmp_dict_name->key, key)){  // 已经存在
             if(!strcmp(tmp_dict_name->key, key)){  // 已经存在
@@ -2224,13 +2224,13 @@ GWARF_value parameter_to_dict(parameter *tmp_s, var_list *the_var){  // 把param
 class_object *dict_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
 class_object *dict_login_official(var_list *the_var, GWARF_result (*paser)(func *, parameter *, var_list *, GWARF_result, var_list *), var_list *father_var_list){
     // 创建对象[空对象]
     // 创建对象[空对象]
     puts("----set class----");
     puts("----set class----");
-    GWARF_result class_value;
+    GWARF_result class_value = GWARF_result_reset;
     class_object *class_tmp = make_object(the_var, father_var_list);
     class_object *class_tmp = make_object(the_var, father_var_list);
 
 
     class_value.value.type = CLASS_value;
     class_value.value.type = CLASS_value;
     class_value.value.value.class_value = class_tmp;
     class_value.value.value.class_value = class_tmp;
 
 
-    assignment_func("dict", class_value, the_var, 0);  // 注册class 的 位置
+    assignment_func("dict", class_value, the_var, 0, auto_public);  // 注册class 的 位置
     puts("----stop set class----");
     puts("----stop set class----");
 
 
     // 注册函数
     // 注册函数
@@ -2245,7 +2245,7 @@ class_object *dict_login_official(var_list *the_var, GWARF_result (*paser)(func
 }
 }
 
 
 GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
 GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_var, GWARF_result father, var_list *out_var){  // out_var是外部环境, the_var是self内部环境
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     var_list *login_var;
     var_list *login_var;
     return_value.u = return_def;
     return_value.u = return_def;
     return_value.return_times = 0;
     return_value.return_times = 0;
@@ -2262,8 +2262,8 @@ GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_
     {
     {
         case __init__func:{  // printf something
         case __init__func:{  // printf something
             if(tmp_s == NULL){  // 生成空列表
             if(tmp_s == NULL){  // 生成空列表
-                GWARF_result tmp_result;
-                GWARF_value dict_tmp;
+                GWARF_result tmp_result = GWARF_result_reset;
+                GWARF_value dict_tmp = GWARF_value_reset;
                 dict_tmp.type = DICT_value;
                 dict_tmp.type = DICT_value;
                 dict_tmp.value.dict_value = malloc(sizeof(the_dict));
                 dict_tmp.value.dict_value = malloc(sizeof(the_dict));
                 dict_tmp.value.dict_value->index = 0;
                 dict_tmp.value.dict_value->index = 0;
@@ -2272,7 +2272,7 @@ GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_
                 dict_tmp.value.dict_value->name_list->key = "";
                 dict_tmp.value.dict_value->name_list->key = "";
                 dict_tmp.value.dict_value->name_list->next = NULL;
                 dict_tmp.value.dict_value->name_list->next = NULL;
                 tmp_result.value = dict_tmp;
                 tmp_result.value = dict_tmp;
-                assignment_func("value", tmp_result, login_var, 0);  // 注册到self
+                assignment_func("value", tmp_result, login_var, 0, auto_public);  // 注册到self
                 return_value.u = statement_end;  // __init__没有return
                 return_value.u = statement_end;  // __init__没有return
             }
             }
             else if(tmp_s->next == NULL){  // 只有一个参数
             else if(tmp_s->next == NULL){  // 只有一个参数
@@ -2286,23 +2286,23 @@ GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_
                     goto return_result;
                     goto return_result;
                 }
                 }
                 tmp.value = to_dict(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
                 tmp.value = to_dict(tmp_result.value, out_var);  // 只有一个参数[要针对不同数据类型对此处作出处理]
-                assignment_func("value", tmp, login_var, 0);  // 注册到self
+                assignment_func("value", tmp, login_var, 0, auto_public);  // 注册到self
                 return_value.u = statement_end;  // __init__没有return
                 return_value.u = statement_end;  // __init__没有return
             }
             }
             else{  // 有多个实参
             else{  // 有多个实参
-                GWARF_result tmp_result;
-                GWARF_value dict_tmp;
+                GWARF_result tmp_result = GWARF_result_reset;
+                GWARF_value dict_tmp = GWARF_value_reset;
                 dict_tmp.type = DICT_value;
                 dict_tmp.type = DICT_value;
                 dict_tmp.value.dict_value = parameter_to_dict(tmp_s, out_var).value.dict_value;
                 dict_tmp.value.dict_value = parameter_to_dict(tmp_s, out_var).value.dict_value;
                 tmp_result.value = dict_tmp;
                 tmp_result.value = dict_tmp;
-                assignment_func("value", tmp_result, login_var, 0);  // 注册到self
+                assignment_func("value", tmp_result, login_var, 0, auto_public);  // 注册到self
                 return_value.u = statement_end;  // __init__没有return
                 return_value.u = statement_end;  // __init__没有return
             }
             }
 
 
-            GWARF_result iter_value;
+            GWARF_result iter_value = GWARF_result_reset;
             iter_value.value.type = INT_value;
             iter_value.value.type = INT_value;
             iter_value.value.value.int_value = 0;
             iter_value.value.value.int_value = 0;
-            assignment_func("iter_value", iter_value, login_var, 0);  // 注册到self
+            assignment_func("iter_value", iter_value, login_var, 0, auto_public);  // 注册到self
             break;
             break;
         }
         }
         case __next__func:{  // return index
         case __next__func:{  // return index
@@ -2330,10 +2330,10 @@ GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_
                     tmp_dict_key = tmp_dict_key->next;
                     tmp_dict_key = tmp_dict_key->next;
                 }
                 }
 
 
-                GWARF_result iter_value;
+                GWARF_result iter_value = GWARF_result_reset;
                 iter_value.value.type = INT_value;
                 iter_value.value.type = INT_value;
                 iter_value.value.value.int_value = iter_index + 1;
                 iter_value.value.value.int_value = iter_index + 1;
-                assignment_func("iter_value", iter_value, login_var, 0);  // 注册到self
+                assignment_func("iter_value", iter_value, login_var, 0, auto_public);  // 注册到self
                 return_value.value = key_to_str(tmp_dict_key->key);
                 return_value.value = key_to_str(tmp_dict_key->key);
             }
             }
 
 
@@ -2390,7 +2390,7 @@ GWARF_result dict_official_func(func *the_func, parameter *tmp_s, var_list *the_
                     return_value = new_value;
                     return_value = new_value;
                     goto return_result;
                     goto return_result;
                 }
                 }
-                login_node(get_value.value.value.string, new_value.value, tmp->value.value.dict_value->dict_value);  // 插入
+                login_node(get_value.value.value.string, new_value.value, tmp->value.value.dict_value->dict_value, public);  // 插入
                 dict_key *tmp_dict_name = tmp->value.value.dict_value->name_list;
                 dict_key *tmp_dict_name = tmp->value.value.dict_value->name_list;
                 while (1){  // 迭代
                 while (1){  // 迭代
                     if(!strcmp(tmp_dict_name->key, get_value.value.value.string)){  // 已经存在
                     if(!strcmp(tmp_dict_name->key, get_value.value.value.string)){  // 已经存在
@@ -2464,7 +2464,7 @@ GWARF_result get__bool__(GWARF_value *base_the_var, var_list *the_var){  // 获
 }
 }
 
 
 GWARF_result run_func_core(GWARF_value *base_the_var, var_list *the_var, char *name, bool only){  // 无参数func->直到返回GWARF_value[not class]
 GWARF_result run_func_core(GWARF_value *base_the_var, var_list *the_var, char *name, bool only){  // 无参数func->直到返回GWARF_value[not class]
-    GWARF_result reight_tmp, get;
+    GWARF_result reight_tmp, get = GWARF_result_reset;
     reight_tmp.u = statement_end;
     reight_tmp.u = statement_end;
     int times = 0;
     int times = 0;
     var_list *call_var;
     var_list *call_var;

+ 155 - 132
inter/interpreter.c

@@ -59,11 +59,11 @@ bool to_bool(GWARF_value value){
 }
 }
 
 
 
 
-GWARF_result read_statement(statement *the_statement, var_list *the_var, var_list *the_login_var){  // read the statement list with case to run by func
+GWARF_result read_statement(statement *the_statement, var_list *the_var, var_list *the_login_var, int key_token){  // read the statement list with case to run by func
     if(the_login_var == NULL){
     if(the_login_var == NULL){
         the_login_var = the_var;
         the_login_var = the_var;
     }
     }
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     return_value.u = statement_end;  // 正常设置[正常语句结束]
     return_value.u = statement_end;  // 正常设置[正常语句结束]
     return_value.value.type = NULL_value;  // 默认设置
     return_value.value.type = NULL_value;  // 默认设置
     return_value.value.value.int_value = 0;  // 默认设置
     return_value.value.value.int_value = 0;  // 默认设置
@@ -226,7 +226,7 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             // printf("return_value.value.type = %d\n", return_value.value);
             // printf("return_value.value.type = %d\n", return_value.value);
             break;
             break;
         }
         }
-        case base_var:{    // because the var tmp, we should ues a {} to make a block[name space] for the tmp var;
+        case base_var:{  // 访问变量
             int from = 0;
             int from = 0;
             if(the_statement->code.base_var.from == NULL){
             if(the_statement->code.base_var.from == NULL){
                 from = 0;
                 from = 0;
@@ -254,7 +254,8 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
                 }
                 }
             }
             }
             var *tmp = find_var(the_var, from, (the_statement->code).base_var.var_name);
             var *tmp = find_var(the_var, from, (the_statement->code).base_var.var_name);
-            if(tmp == NULL){  // 输出name error[共两处会输出]
+            // 检查权限
+            if(tmp == NULL || (tmp->lock == protect && (the_statement->code).base_var.lock_token == public_token)){
                 char *tmp = malloc((size_t)( 21 + strlen(the_statement->code.base_var.var_name) ));
                 char *tmp = malloc((size_t)( 21 + strlen(the_statement->code.base_var.var_name) ));
                 sprintf(tmp, "name not found [%s]\n", the_statement->code.base_var.var_name);
                 sprintf(tmp, "name not found [%s]\n", the_statement->code.base_var.var_name);
                 return_value = to_error(tmp, "NameException", the_var);
                 return_value = to_error(tmp, "NameException", the_var);
@@ -262,25 +263,10 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             else
             else
             {
             {
                 return_value.value = tmp->value;  // get_var
                 return_value.value = tmp->value;  // get_var
-                if((return_value.value.type == INT_value) || (return_value.value.type == BOOL_value)){
-                    printf("var value = %d\n", return_value.value.value.int_value);
-                }
-                else if(return_value.value.type == NUMBER_value){
-                    printf("var value = %f\n", return_value.value.value.double_value);
-                }
-                else if(return_value.value.type == NULL_value){
-                    printf("var value = None\n");
-                }
-                else if(return_value.value.type == STRING_value){
-                    printf("var value = %s\n", return_value.value.value.string);
-                }
-                else{
-                    printf("var value = other[%d]\n", return_value.value.type);
-                }
             }
             }
             break;
             break;
         }
         }
-        case base_svar:{    // because the var tmp, we should ues a {} to make a block[name space] for the tmp var;
+        case base_svar:{
             int from = 0;
             int from = 0;
             if(the_statement->code.base_svar.from == NULL){
             if(the_statement->code.base_svar.from == NULL){
                 from = 0;
                 from = 0;
@@ -340,6 +326,20 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             }
             }
 
 
             GWARF_value base_the_var = tmp_result.value;
             GWARF_value base_the_var = tmp_result.value;
+            // 设定访问权限
+            // (the_statement->code).point.child_var->code.base_var.lock_token == auto_token 代表base_var采用自动访问权限
+            // tmp_result.value.lock_token 当其为self的时候会升级成为lock权限
+            if((the_statement->code).point.child_var->type == base_var && (the_statement->code).point.child_var->code.base_var.lock_token == auto_token){  // 需要调整权限
+                switch (tmp_result.value.lock_token)
+                {
+                case lock:
+                    (the_statement->code).point.child_var->code.base_var.lock_token = protect_token;  // 修改权限
+                    break;
+                default:
+                    (the_statement->code).point.child_var->code.base_var.lock_token = public_token;  // 默认权限
+                    break;
+                }
+            }
             if(base_the_var.type == CLASS_value){  // is class so that can use "."
             if(base_the_var.type == CLASS_value){  // is class so that can use "."
                 return_value = traverse((the_statement->code).point.child_var, base_the_var.value.class_value->the_var, false);
                 return_value = traverse((the_statement->code).point.child_var, base_the_var.value.class_value->the_var, false);
             }
             }
@@ -406,7 +406,7 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             break;
             break;
         }
         }
         case def:{
         case def:{
-            GWARF_result func_value;
+            GWARF_result func_value = GWARF_result_reset;
             func *func_tmp = malloc(sizeof(func));
             func *func_tmp = malloc(sizeof(func));
             func_tmp->done = the_statement->code.def.done;
             func_tmp->done = the_statement->code.def.done;
             func_tmp->parameter_list = the_statement->code.def.parameter_list;
             func_tmp->parameter_list = the_statement->code.def.parameter_list;
@@ -419,7 +419,7 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             func_tmp->the_var = copy_var_list(the_var);
             func_tmp->the_var = copy_var_list(the_var);
             if(the_statement->code.def.setup != NULL){  // 存在setup的内容
             if(the_statement->code.def.setup != NULL){  // 存在setup的内容
                 append_by_var_list(func_tmp->self, func_tmp->the_var);
                 append_by_var_list(func_tmp->self, func_tmp->the_var);
-                GWARF_result tmp;
+                GWARF_result tmp = GWARF_result_reset;
                 tmp = traverse(the_statement->code.def.setup, func_tmp->self, false);
                 tmp = traverse(the_statement->code.def.setup, func_tmp->self, false);
                 if(is_error(&tmp) || is_space(&tmp)){
                 if(is_error(&tmp) || is_space(&tmp)){
                     return_value = tmp;
                     return_value = tmp;
@@ -444,7 +444,7 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             func_value.value.type = FUNC_value;
             func_value.value.type = FUNC_value;
             func_value.value.value.func_value = func_tmp;
             func_value.value.value.func_value = func_tmp;
             printf("the_statement->code.def.var = %d\n", the_statement->code.def.var->type);
             printf("the_statement->code.def.var = %d\n", the_statement->code.def.var->type);
-            assignment_statement_core(the_statement->code.def.var, the_var, the_login_var, func_value, true);  // 注册函数到指定的位置
+            assignment_statement_core(the_statement->code.def.var, the_var, the_login_var, func_value, true, auto_public);  // 注册函数到指定的位置
             // 无返回值
             // 无返回值
             func_break: break;
             func_break: break;
         }
         }
@@ -466,14 +466,14 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
         }
         }
         case set_class:{
         case set_class:{
             puts("----set class----");
             puts("----set class----");
-            GWARF_result class_value;
+            GWARF_result class_value = GWARF_result_reset;
             class_object *class_tmp = malloc(sizeof(class_object));
             class_object *class_tmp = malloc(sizeof(class_object));
 
 
             class_tmp->the_var = make_var_base(make_hash_var());  // make class var list
             class_tmp->the_var = make_var_base(make_hash_var());  // make class var list
             class_value.value.value.class_value = class_tmp;
             class_value.value.value.class_value = class_tmp;
 
 
             // 获取father  -- append_by_var_list[拼凑]
             // 获取father  -- append_by_var_list[拼凑]
-            GWARF_result father_tmp;
+            GWARF_result father_tmp = GWARF_result_reset;
             parameter *tmp_s = the_statement->code.set_class.father_list;
             parameter *tmp_s = the_statement->code.set_class.father_list;
             if(tmp_s != NULL){
             if(tmp_s != NULL){
                 while(1){
                 while(1){
@@ -513,17 +513,17 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
             class_tmp->out_var = copy_var_list(the_var);  //TODO::class_tmp->out_var = copy_var_list(the_var);
             class_tmp->out_var = copy_var_list(the_var);  //TODO::class_tmp->out_var = copy_var_list(the_var);
             // 执行done
             // 执行done
             statement *tmp = the_statement->code.set_class.done;
             statement *tmp = the_statement->code.set_class.done;
-            GWARF_result result;
+            GWARF_result result = GWARF_result_reset;
             while(1){
             while(1){
                 if(tmp == NULL){
                 if(tmp == NULL){
                     break;  // off
                     break;  // off
                 }
                 }
-                read_statement(tmp, the_var, class_tmp->the_var);
+                read_statement(tmp, the_var, class_tmp->the_var, lock);
                 tmp = tmp->next;
                 tmp = tmp->next;
             }
             }
 
 
             class_value.value.type = CLASS_value;
             class_value.value.type = CLASS_value;
-            assignment_statement_core(the_statement->code.set_class.var, the_var,the_login_var, class_value, true);  // 注册class 的 位置
+            assignment_statement_core(the_statement->code.set_class.var, the_var,the_login_var, class_value, true, auto_public);  // 注册class 的 位置
             puts("----stop set class----");
             puts("----stop set class----");
             // 无返回值
             // 无返回值
             break;
             break;
@@ -760,6 +760,7 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
                 }
                 }
                 return_value.value = to_object(tmp_result.value, the_var);
                 return_value.value = to_object(tmp_result.value, the_var);
             }
             }
+            return_value.value.lock_token = base;
             break;
             break;
         case rewent:
         case rewent:
             return_value.u = code_rewent;  // rego but not now
             return_value.u = code_rewent;  // rego but not now
@@ -839,7 +840,7 @@ GWARF_result read_statement(statement *the_statement, var_list *the_var, var_lis
 }
 }
 
 
 GWARF_result get_value(statement *the_statement, var_list *the_var, var_list *out_var){  // 为tmp_x和tmp_s注册函数所用  其中out_var是外部函数
 GWARF_result get_value(statement *the_statement, var_list *the_var, var_list *out_var){  // 为tmp_x和tmp_s注册函数所用  其中out_var是外部函数
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     return_value.u = statement_end;  // 正常设置[正常语句结束]
     return_value.u = statement_end;  // 正常设置[正常语句结束]
     return_value.value.type = NULL_value;  // 默认设置
     return_value.value.type = NULL_value;  // 默认设置
     return_value.value.value.int_value = 0;  // 默认设置
     return_value.value.value.int_value = 0;  // 默认设置
@@ -890,7 +891,7 @@ GWARF_result get_value(statement *the_statement, var_list *the_var, var_list *ou
 
 
 // -----------------include func
 // -----------------include func
 GWARF_result include_func(statement *the_statement, var_list *the_var){
 GWARF_result include_func(statement *the_statement, var_list *the_var){
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     statement *file_statement = the_statement->code.include_import.file;
     statement *file_statement = the_statement->code.include_import.file;
 
 
     GWARF_value file = to_str(traverse(file_statement, the_var, false).value, the_var);
     GWARF_value file = to_str(traverse(file_statement, the_var, false).value, the_var);
@@ -920,7 +921,7 @@ GWARF_result include_func(statement *the_statement, var_list *the_var){
 
 
 // -----------------import func
 // -----------------import func
 GWARF_result import_func(statement *the_statement, var_list *the_var){
 GWARF_result import_func(statement *the_statement, var_list *the_var){
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     statement *file_statement = the_statement->code.import_class.file;
     statement *file_statement = the_statement->code.import_class.file;
     
     
     GWARF_value file = to_str(traverse(file_statement, the_var, false).value, the_var);
     GWARF_value file = to_str(traverse(file_statement, the_var, false).value, the_var);
@@ -944,7 +945,7 @@ GWARF_result import_func(statement *the_statement, var_list *the_var){
     global_inter = old_global;  // 保存旧迭代器
     global_inter = old_global;  // 保存旧迭代器
     statement_base = old_statement_base;  // 保存statement_base
     statement_base = old_statement_base;  // 保存statement_base
 
 
-    GWARF_result import_result;
+    GWARF_result import_result = GWARF_result_reset;
     import_result.value.type = CLASS_value;
     import_result.value.type = CLASS_value;
     
     
     class_object *class_tmp = malloc(sizeof(class_object));
     class_object *class_tmp = malloc(sizeof(class_object));
@@ -952,7 +953,7 @@ GWARF_result import_func(statement *the_statement, var_list *the_var){
     class_tmp->out_var = copy_var_list(the_var);  // make class var list with out var
     class_tmp->out_var = copy_var_list(the_var);  // make class var list with out var
 
 
     import_result.value.value.class_value = class_tmp;
     import_result.value.value.class_value = class_tmp;
-    assignment_statement_core(the_statement->code.import_class.var, the_var, the_var, import_result, true);
+    assignment_statement_core(the_statement->code.import_class.var, the_var, the_var, import_result, true, auto_public);
 
 
     return_value.u = statement_end;
     return_value.u = statement_end;
     return_value.value.type = NULL_value;
     return_value.value.type = NULL_value;
@@ -963,7 +964,7 @@ GWARF_result import_func(statement *the_statement, var_list *the_var){
 // -----------------if func
 // -----------------if func
 
 
 GWARF_result if_func(if_list *if_base, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result if_func(if_list *if_base, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result value;
+    GWARF_result value = GWARF_result_reset;
     if_list *start;
     if_list *start;
     again: start = if_base;
     again: start = if_base;
     bool rego = false;  // switch...case...
     bool rego = false;  // switch...case...
@@ -1131,7 +1132,7 @@ GWARF_result if_func(if_list *if_base, var_list *the_var){  // read the statemen
 
 
 // -----------------for func
 // -----------------for func
 GWARF_result for_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result for_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result value;
+    GWARF_result value = GWARF_result_reset;
     hash_var *tmp = make_hash_var();  // base_var
     hash_var *tmp = make_hash_var();  // base_var
     the_var = append_var_list(tmp, the_var);
     the_var = append_var_list(tmp, the_var);
     bool condition;
     bool condition;
@@ -1239,8 +1240,8 @@ GWARF_result for_func(statement *the_statement, var_list *the_var){  // read the
 
 
 // -----------------assert func
 // -----------------assert func
 GWARF_result assert_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result assert_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result error_value;
-    GWARF_value info;
+    GWARF_result error_value = GWARF_result_reset;
+    GWARF_value info = GWARF_value_reset;
 
 
     GWARF_result tmp_result = traverse(the_statement->code.assert_e.condition, the_var, false);
     GWARF_result tmp_result = traverse(the_statement->code.assert_e.condition, the_var, false);
     if(is_error(&tmp_result)){  // Name Error错误
     if(is_error(&tmp_result)){  // Name Error错误
@@ -1277,15 +1278,15 @@ GWARF_result assert_func(statement *the_statement, var_list *the_var){  // read
 
 
 // -----------------raise func
 // -----------------raise func
 GWARF_result raise_func(statement *the_statement, var_list *the_var, bool not_class){  // read the statement list with case to run by func
 GWARF_result raise_func(statement *the_statement, var_list *the_var, bool not_class){  // read the statement list with case to run by func
-    GWARF_result error_value;
-    GWARF_value info;
+    GWARF_result error_value = GWARF_result_reset;
+    GWARF_value info = GWARF_value_reset;
 
 
     if(not_class){  // raise
     if(not_class){  // raise
         error_value = traverse(the_statement->code.raise_e.done, the_var, false);
         error_value = traverse(the_statement->code.raise_e.done, the_var, false);
         info = to_str(traverse(the_statement->code.raise_e.info, the_var, false).value, the_var);
         info = to_str(traverse(the_statement->code.raise_e.info, the_var, false).value, the_var);
     }
     }
     else{  // raise
     else{  // raise
-        GWARF_value tmp;
+        GWARF_value tmp = GWARF_value_reset;
         tmp.type = STRING_value;
         tmp.type = STRING_value;
         tmp.value.string = "throw by user";
         tmp.value.string = "throw by user";
         error_value = traverse(the_statement->code.throw_e.done, the_var, false);
         error_value = traverse(the_statement->code.throw_e.done, the_var, false);
@@ -1319,7 +1320,7 @@ GWARF_result raise_func(statement *the_statement, var_list *the_var, bool not_cl
 
 
 // -----------------try func
 // -----------------try func
 GWARF_result try_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result try_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result value;
+    GWARF_result value = GWARF_result_reset;
 
 
     hash_var *tmp = make_hash_var();  // base_var
     hash_var *tmp = make_hash_var();  // base_var
     the_var = append_var_list(tmp, the_var);
     the_var = append_var_list(tmp, the_var);
@@ -1390,7 +1391,7 @@ GWARF_result try_func(statement *the_statement, var_list *the_var){  // read the
 // -----------------block func
 // -----------------block func
 
 
 GWARF_result block_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result block_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result value;
+    GWARF_result value = GWARF_result_reset;
     again: 
     again: 
     puts("----block----");
     puts("----block----");
     value = traverse(the_statement->code.code_block.done, the_var, true);
     value = traverse(the_statement->code.code_block.done, the_var, true);
@@ -1447,7 +1448,7 @@ GWARF_result block_func(statement *the_statement, var_list *the_var){  // read t
 // -----------------forin func
 // -----------------forin func
 
 
 GWARF_result forin_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result forin_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result value;
+    GWARF_result value = GWARF_result_reset;
     hash_var *tmp = make_hash_var();  // base_var
     hash_var *tmp = make_hash_var();  // base_var
     the_var = append_var_list(tmp, the_var);
     the_var = append_var_list(tmp, the_var);
     
     
@@ -1534,7 +1535,7 @@ GWARF_result forin_func(statement *the_statement, var_list *the_var){  // read t
 // -----------------while func
 // -----------------while func
 
 
 GWARF_result while_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
 GWARF_result while_func(statement *the_statement, var_list *the_var){  // read the statement list with case to run by func
-    GWARF_result value;
+    GWARF_result value = GWARF_result_reset;
     bool do_while = the_statement->code.while_cycle.first_do;  // 如果是do_while 则返回true
     bool do_while = the_statement->code.while_cycle.first_do;  // 如果是do_while 则返回true
 
 
     hash_var *tmp = make_hash_var();  // base_var
     hash_var *tmp = make_hash_var();  // base_var
@@ -1623,7 +1624,7 @@ GWARF_result while_func(statement *the_statement, var_list *the_var){  // read t
 // -----------------operation func
 // -----------------operation func
 
 
 GWARF_result operation_func(statement *the_statement, var_list *the_var, var_list *login_var){  // read the statement list with case to run by func
 GWARF_result operation_func(statement *the_statement, var_list *the_var, var_list *login_var){  // read the statement list with case to run by func
-    GWARF_result value, left_result, right_result;
+    GWARF_result value, left_result, right_result = GWARF_result_reset;
     int func_type = the_statement->code.operation.type;
     int func_type = the_statement->code.operation.type;
     if(func_type != ASSIGnMENT_func && func_type != AND_func && func_type != OR_func)
     if(func_type != ASSIGnMENT_func && func_type != AND_func && func_type != OR_func)
     {
     {
@@ -1781,14 +1782,14 @@ GWARF_result operation_func(statement *the_statement, var_list *the_var, var_lis
 }
 }
 
 
 GWARF_result assignment_statement_value(statement *the_statement, var_list *the_var, var_list *login_var, GWARF_value right_value){
 GWARF_result assignment_statement_value(statement *the_statement, var_list *the_var, var_list *login_var, GWARF_value right_value){
-    GWARF_result tmp;
+    GWARF_result tmp = GWARF_result_reset;
     tmp.u = statement_end;
     tmp.u = statement_end;
     tmp.value = right_value;
     tmp.value = right_value;
     return assignment_statement(the_statement, the_var, login_var, tmp);
     return assignment_statement(the_statement, the_var, login_var, tmp);
 }
 }
 
 
-GWARF_result assignment_statement_core(statement *the_statement, var_list *the_var, var_list *login_var, GWARF_result right_result, bool self){
-    GWARF_result value;
+GWARF_result assignment_statement_core(statement *the_statement, var_list *the_var, var_list *login_var, GWARF_result right_result, bool self, int the_lock){  // int lock代表的是注册权限,如果是auto_public则根据the_statement来决定权限
+    GWARF_result value = GWARF_result_reset;
     value.u = statement_end;
     value.u = statement_end;
     value.value.type = NULL_value;
     value.value.type = NULL_value;
     value.value.value.int_value = 0;
     value.value.value.int_value = 0;
@@ -1830,8 +1831,17 @@ GWARF_result assignment_statement_core(statement *the_statement, var_list *the_v
                 from = 0;
                 from = 0;
             }
             }
         }
         }
-
-        value = assignment_func(left, right_result, login_var, from);
+        if(the_lock == auto_public){  // 调整注册权限
+            switch(the_statement->code.base_var.lock_token){
+                case public_token:
+                the_lock = public;
+                break;
+                case protect_token:
+                the_lock = protect;
+                break;
+            }
+        }
+        value = assignment_func(left, right_result, login_var, from, the_lock);
         value.base_name = left;
         value.base_name = left;
     }
     }
     else if(the_statement->type == point){  // 通过point赋值
     else if(the_statement->type == point){  // 通过point赋值
@@ -1843,6 +1853,18 @@ GWARF_result assignment_statement_core(statement *the_statement, var_list *the_v
         else if(is_space(&tmp_result)){
         else if(is_space(&tmp_result)){
             return tmp_result;
             return tmp_result;
         }
         }
+        if((the_statement->code).point.child_var->type == base_var && (the_statement->code).point.child_var->code.base_var.lock_token == auto_token){  // 需要调整权限
+            switch (tmp_result.value.lock_token)
+            {
+            case lock:
+                (the_statement->code).point.child_var->code.base_var.lock_token = protect_token;  // 修改权限
+                break;
+            default:
+                (the_statement->code).point.child_var->code.base_var.lock_token = public_token;  // 默认权限
+                break;
+            }
+        }
+        
         GWARF_value base_the_var = tmp_result.value;  // 不用取value
         GWARF_value base_the_var = tmp_result.value;  // 不用取value
         if(base_the_var.type == CLASS_value){
         if(base_the_var.type == CLASS_value){
             value = assignment_statement(the_statement->code.point.child_var, the_var, base_the_var.value.class_value->the_var, right_result);
             value = assignment_statement(the_statement->code.point.child_var, the_var, base_the_var.value.class_value->the_var, right_result);
@@ -1933,7 +1955,7 @@ GWARF_result assignment_statement_core(statement *the_statement, var_list *the_v
             return right_result;
             return right_result;
         }
         }
         char *str = to_str_dict(eq_object.value, the_var).value.string;
         char *str = to_str_dict(eq_object.value, the_var).value.string;
-        value = assignment_func(str, right_result, login_var, from);
+        value = assignment_func(str, right_result, login_var, from, the_lock);
         value.base_name = str;  // str来自value,本身就是malloc申请的内存
         value.base_name = str;  // str来自value,本身就是malloc申请的内存
     }
     }
     else{  // 非标准赋值
     else{  // 非标准赋值
@@ -1948,7 +1970,7 @@ GWARF_result assignment_statement_core(statement *the_statement, var_list *the_v
             return right_result;
             return right_result;
         }
         }
         char *str = to_str_dict(eq_object.value, the_var).value.string;
         char *str = to_str_dict(eq_object.value, the_var).value.string;
-        value = assignment_func(str, right_result, login_var, 0);
+        value = assignment_func(str, right_result, login_var, 0, the_lock);
         value.base_name = str;
         value.base_name = str;
     }
     }
     return value;
     return value;
@@ -1969,7 +1991,7 @@ GWARF_result call_back(statement *the_statement, var_list *the_var){  // the fun
 }
 }
 
 
 GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp_x, parameter *tmp_s){
 GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp_x, parameter *tmp_s){
-    GWARF_result return_result;
+    GWARF_result return_result = GWARF_result_reset;
     return_result.u = statement_end;
     return_result.u = statement_end;
     return_result.value.type = NULL_value;
     return_result.value.type = NULL_value;
     return_result.value.value.int_value = 0;
     return_result.value.value.int_value = 0;
@@ -2001,7 +2023,7 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
                         tmp_x = tmp_x->next;  // get the next to iter
                         tmp_x = tmp_x->next;  // get the next to iter
                     }
                     }
                     else if(tmp_x->type == put_args){  // args默认为[]
                     else if(tmp_x->type == put_args){  // args默认为[]
-                        GWARF_result func_result;
+                        GWARF_result func_result = GWARF_result_reset;
                         var *list_init;
                         var *list_init;
                         func_result.u = statement_end;
                         func_result.u = statement_end;
                         list_init = find_var(old_var_list, 0, "list");
                         list_init = find_var(old_var_list, 0, "list");
@@ -2043,13 +2065,13 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
                                     break;
                                     break;
                                 }
                                 }
                                 // 设置值
                                 // 设置值
-                                GWARF_value parameter_key;
+                                GWARF_value parameter_key = GWARF_value_reset;
                                 parameter_key.type = STRING_value;
                                 parameter_key.type = STRING_value;
                                 parameter_key.value.string = dict_var_tmp->name;
                                 parameter_key.value.string = dict_var_tmp->name;
                                 parameter *tmp = pack_value_parameter(parameter_key);  // 索引
                                 parameter *tmp = pack_value_parameter(parameter_key);  // 索引
                                 tmp->next = pack_value_parameter(dict_var_tmp->value);  // 赋值内容
                                 tmp->next = pack_value_parameter(dict_var_tmp->value);  // 赋值内容
                                 
                                 
-                                GWARF_result get;
+                                GWARF_result get = GWARF_result_reset;
                                 var_list *call_var = dict_tmp.value.object_value->the_var;
                                 var_list *call_var = dict_tmp.value.object_value->the_var;
 
 
                                 var *__down__tmp = find_var(call_var, 0, "__set__");
                                 var *__down__tmp = find_var(call_var, 0, "__set__");
@@ -2062,7 +2084,7 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
                             }
                             }
                             
                             
                         }
                         }
-                        GWARF_result dict_result;
+                        GWARF_result dict_result = GWARF_result_reset;
                         dict_result.value = dict_tmp;
                         dict_result.value = dict_tmp;
                         assignment_statement(tmp_x->u.var, old_var_list, the_var, dict_result);
                         assignment_statement(tmp_x->u.var, old_var_list, the_var, dict_result);
                         tmp_x->next = NULL;  // 理论上没有下一个
                         tmp_x->next = NULL;  // 理论上没有下一个
@@ -2114,7 +2136,7 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
                     return tmp_next;
                     return tmp_next;
                 }
                 }
 
 
-                GWARF_result get;
+                GWARF_result get = GWARF_result_reset;
                 var_list *call_var = tmp.value.value.object_value->the_var;
                 var_list *call_var = tmp.value.value.object_value->the_var;
 
 
                 var *__down__tmp = find_var(call_var, 0, "__down__");
                 var *__down__tmp = find_var(call_var, 0, "__down__");
@@ -2139,7 +2161,7 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
         }
         }
         else if(assignment_type == 0 && tmp_x->type == put_kwargs){  // tmp_s还没到根据name_value的阶段, 遇到了**kwargs,则把后面的所有直接变成dict
         else if(assignment_type == 0 && tmp_x->type == put_kwargs){  // tmp_s还没到根据name_value的阶段, 遇到了**kwargs,则把后面的所有直接变成dict
             // 放入list中
             // 放入list中
-            GWARF_result dict_tmp;
+            GWARF_result dict_tmp = GWARF_result_reset;
             dict_tmp.value = to_object(parameter_to_dict(tmp_s, old_var_list), old_var_list);  // 把所有name_value变成dict
             dict_tmp.value = to_object(parameter_to_dict(tmp_s, old_var_list), old_var_list);  // 把所有name_value变成dict
             assignment_statement(tmp_x->u.var, old_var_list, the_var, dict_tmp);
             assignment_statement(tmp_x->u.var, old_var_list, the_var, dict_tmp);
             assignment_type = 1;  // 进入根据实参赋值模式
             assignment_type = 1;  // 进入根据实参赋值模式
@@ -2175,7 +2197,7 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
         }
         }
         else if(assignment_type == 0 && tmp_x->type == put_args){  // 形参出现了*args,收归所有无默认值的实参[如果以及开始了根据tmp_s赋值模式,则*args无效]
         else if(assignment_type == 0 && tmp_x->type == put_args){  // 形参出现了*args,收归所有无默认值的实参[如果以及开始了根据tmp_s赋值模式,则*args无效]
             // 放入list中
             // 放入list中
-            GWARF_result list_tmp;
+            GWARF_result list_tmp = GWARF_result_reset;
             list_tmp.value = to_object(parameter_to_list(tmp_s, old_var_list), old_var_list);  // 把所有only_value变成list
             list_tmp.value = to_object(parameter_to_list(tmp_s, old_var_list), old_var_list);  // 把所有only_value变成list
             assignment_statement(tmp_x->u.var, old_var_list, the_var, list_tmp);
             assignment_statement(tmp_x->u.var, old_var_list, the_var, list_tmp);
             assignment_type = 1;  // 进入根据实参赋值模式
             assignment_type = 1;  // 进入根据实参赋值模式
@@ -2200,7 +2222,7 @@ GWARF_result login_var(var_list *the_var, var_list *old_var_list, parameter *tmp
 }
 }
 
 
 GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_s){  // the func for add and call from read_statement_list
 GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_s){  // the func for add and call from read_statement_list
-    GWARF_result result;
+    GWARF_result result = GWARF_result_reset;
     var_list *old_var_list = the_var;
     var_list *old_var_list = the_var;
     if(get.value.type == FUNC_value){
     if(get.value.type == FUNC_value){
         func *func_ = get.value.value.func_value;
         func *func_ = get.value.value.func_value;
@@ -2219,11 +2241,12 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
 
 
         if(func_->type == customize){  // 用户定义的方法
         if(func_->type == customize){  // 用户定义的方法
             // 赋值self
             // 赋值self
-            GWARF_result father;
+            GWARF_result father = GWARF_result_reset;
             if(func_->is_class == action){
             if(func_->is_class == action){
                 if(get.father != NULL && get.father->type == OBJECT_value){
                 if(get.father != NULL && get.father->type == OBJECT_value){
                     father.value = *(get.father);
                     father.value = *(get.father);
-                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true);
+                    father.value.lock_token = lock;
+                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true, auto_public);
                     tmp_x = tmp_x->next;  // get the next to iter
                     tmp_x = tmp_x->next;  // get the next to iter
                 }
                 }
             }
             }
@@ -2239,7 +2262,7 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
                         class_tmp->the_var = get.father->value.object_value->cls;
                         class_tmp->the_var = get.father->value.object_value->cls;
                         class_tmp->out_var = old_var_list;
                         class_tmp->out_var = old_var_list;
                     }
                     }
-                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true);
+                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true, auto_public);
                     tmp_x = tmp_x->next;  // get the next to iter
                     tmp_x = tmp_x->next;  // get the next to iter
                 }
                 }
                 else{
                 else{
@@ -2282,7 +2305,7 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
         the_object *object_tmp = malloc(sizeof(the_object));  // 生成object的空间
         the_object *object_tmp = malloc(sizeof(the_object));  // 生成object的空间
         object_tmp->cls = get.value.value.class_value->the_var;
         object_tmp->cls = get.value.value.class_value->the_var;
         object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);
         object_tmp->the_var = append_by_var_list(make_var_base(make_hash_var()), object_tmp->cls);
-        GWARF_value tmp;
+        GWARF_value tmp = GWARF_value_reset;
         tmp.type = OBJECT_value;
         tmp.type = OBJECT_value;
         tmp.value.object_value = object_tmp;
         tmp.value.object_value = object_tmp;
 
 
@@ -2298,15 +2321,15 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
             the_var = append_var_list(tmp, the_var);
             the_var = append_var_list(tmp, the_var);
 
 
             if(func_->type == customize){  // 用户定义的方法
             if(func_->type == customize){  // 用户定义的方法
-                GWARF_result father;
+                GWARF_result father = GWARF_result_reset;
                 father.value.type = OBJECT_value;
                 father.value.type = OBJECT_value;
                 father.value.value.object_value = object_tmp;
                 father.value.value.object_value = object_tmp;
                 if(func_->is_class == action){
                 if(func_->is_class == action){
-                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true);
+                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true, auto_public);
                     tmp_x = tmp_x->next;  // get the next to iter
                     tmp_x = tmp_x->next;  // get the next to iter
                 }
                 }
                 else if(func_->is_class == cls){
                 else if(func_->is_class == cls){
-                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, get, true);  // 传入父亲
+                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, get, true, auto_public);  // 传入父亲
                     tmp_x = tmp_x->next;  // get the next to iter
                     tmp_x = tmp_x->next;  // get the next to iter
                 }
                 }
 
 
@@ -2332,8 +2355,8 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
                 puts("----stop start func----");
                 puts("----stop start func----");
             }
             }
             else{
             else{
-                GWARF_result tmp_get;
-                GWARF_value father;
+                GWARF_result tmp_get = GWARF_result_reset;
+                GWARF_value father = GWARF_value_reset;
                 father.type = OBJECT_value;
                 father.type = OBJECT_value;
                 father.value.object_value = object_tmp;
                 father.value.object_value = object_tmp;
                 tmp_get.father = &father;
                 tmp_get.father = &father;
@@ -2370,18 +2393,18 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
 
 
             if(func_->type == customize){  // 用户定义的方法
             if(func_->type == customize){  // 用户定义的方法
                 if(func_->is_class == action){
                 if(func_->is_class == action){
-                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, get, true);
+                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, get, true, auto_public);
                     tmp_x = tmp_x->next;  // get the next to iter
                     tmp_x = tmp_x->next;  // get the next to iter
                 }
                 }
                 else if(func_->is_class == cls){
                 else if(func_->is_class == cls){
-                    GWARF_result father;
+                    GWARF_result father = GWARF_result_reset;
                     class_object *class_tmp = malloc(sizeof(class_object));
                     class_object *class_tmp = malloc(sizeof(class_object));
 
 
                     father.value.type = CLASS_value;
                     father.value.type = CLASS_value;
                     father.value.value.class_value = class_tmp;
                     father.value.value.class_value = class_tmp;
                     class_tmp->the_var = get.value.value.object_value->cls;
                     class_tmp->the_var = get.value.value.object_value->cls;
                     class_tmp->out_var = old_var_list;
                     class_tmp->out_var = old_var_list;
-                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true);
+                    assignment_statement_core(tmp_x->u.var, old_var_list, the_var, father, true, auto_public);
                     tmp_x = tmp_x->next;  // get the next to iter
                     tmp_x = tmp_x->next;  // get the next to iter
                 }
                 }
 
 
@@ -2409,8 +2432,8 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
                 puts("----stop start func----");
                 puts("----stop start func----");
             }
             }
             else{  // 官方方法
             else{  // 官方方法
-                GWARF_result tmp_get;
-                GWARF_value father;
+                GWARF_result tmp_get = GWARF_result_reset;
+                GWARF_value father = GWARF_value_reset;
                 father.type = OBJECT_value;
                 father.type = OBJECT_value;
                 father.value.object_value = get.value.value.object_value;
                 father.value.object_value = get.value.value.object_value;
                 tmp_get.father = &father;
                 tmp_get.father = &father;
@@ -2442,7 +2465,7 @@ GWARF_result call_back_core(GWARF_result get, var_list *the_var, parameter *tmp_
 
 
 // ---------  AND
 // ---------  AND
 GWARF_result and_func(statement *left_statement, statement *right_statement, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result and_func(statement *left_statement, statement *right_statement, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for and
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for and
     return_value.u = statement_end;
     return_value.u = statement_end;
     return_value.value.type = BOOL_value;
     return_value.value.type = BOOL_value;
 
 
@@ -2464,7 +2487,7 @@ GWARF_result and_func(statement *left_statement, statement *right_statement, var
 
 
 // ---------  OR
 // ---------  OR
 GWARF_result or_func(statement *left_statement, statement *right_statement, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result or_func(statement *left_statement, statement *right_statement, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for and
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for and
     return_value.u = statement_end;
     return_value.u = statement_end;
     return_value.value.type = BOOL_value;
     return_value.value.type = BOOL_value;
 
 
@@ -2486,7 +2509,7 @@ GWARF_result or_func(statement *left_statement, statement *right_statement, var_
 
 
 // ---------  NOT
 // ---------  NOT
 GWARF_result not_func(GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result not_func(GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for and
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for and
     return_value.u = statement_end;
     return_value.u = statement_end;
     return_value.value.type = BOOL_value;
     return_value.value.type = BOOL_value;
     bool right = to_bool(right_result.value);
     bool right = to_bool(right_result.value);
@@ -2502,9 +2525,9 @@ GWARF_result not_func(GWARF_result right_result, var_list *the_var){  // the fun
 
 
 // ---------  BITAND &
 // ---------  BITAND &
 GWARF_result bit_and_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result bit_and_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for add
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for add
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2518,7 +2541,7 @@ GWARF_result bit_and_func(GWARF_result left_result, GWARF_result right_result, v
         // goto next if
         // goto next if
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2572,9 +2595,9 @@ GWARF_result bit_and_func(GWARF_result left_result, GWARF_result right_result, v
 
 
 // ---------  BITOR |
 // ---------  BITOR |
 GWARF_result bit_or_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result bit_or_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for add
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for add
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2588,7 +2611,7 @@ GWARF_result bit_or_func(GWARF_result left_result, GWARF_result right_result, va
         // goto next if
         // goto next if
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2643,9 +2666,9 @@ GWARF_result bit_or_func(GWARF_result left_result, GWARF_result right_result, va
 
 
 // ---------  BITNOTOR ^
 // ---------  BITNOTOR ^
 GWARF_result bit_notor_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result bit_notor_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for add
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for add
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2659,7 +2682,7 @@ GWARF_result bit_notor_func(GWARF_result left_result, GWARF_result right_result,
         // goto next if
         // goto next if
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2713,9 +2736,9 @@ GWARF_result bit_notor_func(GWARF_result left_result, GWARF_result right_result,
 
 
 // ---------  BITLEFT <<
 // ---------  BITLEFT <<
 GWARF_result bit_left_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result bit_left_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for add
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for add
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2729,7 +2752,7 @@ GWARF_result bit_left_func(GWARF_result left_result, GWARF_result right_result,
         // goto next if
         // goto next if
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2783,9 +2806,9 @@ GWARF_result bit_left_func(GWARF_result left_result, GWARF_result right_result,
 
 
 // ---------  BITRIGHT >>
 // ---------  BITRIGHT >>
 GWARF_result bit_right_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result bit_right_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for add
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for add
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2799,7 +2822,7 @@ GWARF_result bit_right_func(GWARF_result left_result, GWARF_result right_result,
         // goto next if
         // goto next if
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2853,9 +2876,9 @@ GWARF_result bit_right_func(GWARF_result left_result, GWARF_result right_result,
 
 
 // ---------  BITNOT ~
 // ---------  BITNOT ~
 GWARF_result bit_not_func(GWARF_result right_result, var_list *the_var){  // the func for negative and call from read_statement_list
 GWARF_result bit_not_func(GWARF_result right_result, var_list *the_var){  // the func for negative and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for negative
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for negative
     if(right_result.value.type == OBJECT_value){  // 调用右sub方法
     if(right_result.value.type == OBJECT_value){  // 调用右sub方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2904,9 +2927,9 @@ GWARF_result bit_not_func(GWARF_result right_result, var_list *the_var){  // the
 
 
 // ---------  ADD
 // ---------  ADD
 GWARF_result add_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
 GWARF_result add_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for add and call from read_statement_list
-    GWARF_result return_value, get;  // the result by call read_statement_list with left and right; value is the result for add
+    GWARF_result return_value, get;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for add
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
     if(left_result.value.type == OBJECT_value){  // 调用左add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2920,7 +2943,7 @@ GWARF_result add_func(GWARF_result left_result, GWARF_result right_result, var_l
         // goto next if
         // goto next if
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
     if(right_result.value.type == OBJECT_value){  // 调用右add方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2983,9 +3006,9 @@ GWARF_result add_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  SUB
 // ---------  SUB
 GWARF_result sub_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for sub and call from read_statement_list
 GWARF_result sub_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for sub and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for sub
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for sub
     if(left_result.value.type == OBJECT_value){  // 调用左sub方法
     if(left_result.value.type == OBJECT_value){  // 调用左sub方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -2998,7 +3021,7 @@ GWARF_result sub_func(GWARF_result left_result, GWARF_result right_result, var_l
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右sub方法
     if(right_result.value.type == OBJECT_value){  // 调用右sub方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3049,9 +3072,9 @@ GWARF_result sub_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  negative
 // ---------  negative
 GWARF_result negative_func(GWARF_result right_result, var_list *the_var){  // the func for negative and call from read_statement_list
 GWARF_result negative_func(GWARF_result right_result, var_list *the_var){  // the func for negative and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for negative
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for negative
     if(right_result.value.type == OBJECT_value){  // 调用右sub方法
     if(right_result.value.type == OBJECT_value){  // 调用右sub方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3111,9 +3134,9 @@ GWARF_result negative_func(GWARF_result right_result, var_list *the_var){  // th
 
 
 // ---------  MUL
 // ---------  MUL
 GWARF_result mul_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for mul and call from read_statement_list
 GWARF_result mul_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for mul and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for mul
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for mul
     if(left_result.value.type == OBJECT_value){  // 调用左mul方法
     if(left_result.value.type == OBJECT_value){  // 调用左mul方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3126,7 +3149,7 @@ GWARF_result mul_func(GWARF_result left_result, GWARF_result right_result, var_l
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右mul方法
     if(right_result.value.type == OBJECT_value){  // 调用右mul方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3236,9 +3259,9 @@ GWARF_result mul_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  DIV
 // ---------  DIV
 GWARF_result div_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
 GWARF_result div_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for div
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for div
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3251,7 +3274,7 @@ GWARF_result div_func(GWARF_result left_result, GWARF_result right_result, var_l
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3303,9 +3326,9 @@ GWARF_result div_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  MOD_func
 // ---------  MOD_func
 GWARF_result mod_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
 GWARF_result mod_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for div
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for div
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3318,7 +3341,7 @@ GWARF_result mod_func(GWARF_result left_result, GWARF_result right_result, var_l
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3370,9 +3393,9 @@ GWARF_result mod_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  int_div[整除]
 // ---------  int_div[整除]
 GWARF_result int_div_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
 GWARF_result int_div_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for div
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for div
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3385,7 +3408,7 @@ GWARF_result int_div_func(GWARF_result left_result, GWARF_result right_result, v
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3437,9 +3460,9 @@ GWARF_result int_div_func(GWARF_result left_result, GWARF_result right_result, v
 
 
 // ---------  POW
 // ---------  POW
 GWARF_result pow_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
 GWARF_result pow_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for div
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for div
     if(left_result.value.type == OBJECT_value){  // 调用左pow方法
     if(left_result.value.type == OBJECT_value){  // 调用左pow方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3452,7 +3475,7 @@ GWARF_result pow_func(GWARF_result left_result, GWARF_result right_result, var_l
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右pow方法
     if(right_result.value.type == OBJECT_value){  // 调用右pow方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3503,9 +3526,9 @@ GWARF_result pow_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  LOG
 // ---------  LOG
 GWARF_result log_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
 GWARF_result log_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for div
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for div
     if(left_result.value.type == OBJECT_value){  // 调用左log方法
     if(left_result.value.type == OBJECT_value){  // 调用左log方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3518,7 +3541,7 @@ GWARF_result log_func(GWARF_result left_result, GWARF_result right_result, var_l
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右log方法
     if(right_result.value.type == OBJECT_value){  // 调用右log方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3569,9 +3592,9 @@ GWARF_result log_func(GWARF_result left_result, GWARF_result right_result, var_l
 
 
 // ---------  SQRT
 // ---------  SQRT
 GWARF_result sqrt_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
 GWARF_result sqrt_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var){  // the func for div and call from read_statement_list
-    GWARF_result return_value;  // the result by call read_statement_list with left and right; value is the result for div
+    GWARF_result return_value;  // the result by call read_statement_list with left and right = GWARF_result_reset; value is the result for div
     if(left_result.value.type == OBJECT_value){  // 调用左sqrt方法
     if(left_result.value.type == OBJECT_value){  // 调用左sqrt方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3584,7 +3607,7 @@ GWARF_result sqrt_func(GWARF_result left_result, GWARF_result right_result, var_
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右sqrt方法
     if(right_result.value.type == OBJECT_value){  // 调用右sqrt方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3634,20 +3657,20 @@ GWARF_result sqrt_func(GWARF_result left_result, GWARF_result right_result, var_
 }
 }
 
 
 // ---------  ASSIGnMENT
 // ---------  ASSIGnMENT
-GWARF_result assignment_func(char *left, GWARF_result right_result, var_list *the_var, int from){  // the func for assignment and call from read_statement_list
-    add_var(the_var, from, left, right_result.value);
+GWARF_result assignment_func(char *left, GWARF_result right_result, var_list *the_var, int from, int lock){  // lock代表变量的权限
+    add_var(the_var, from, left, right_result.value, lock);
     return right_result;
     return right_result;
 }
 }
 
 
 // ---------  EQUAL
 // ---------  EQUAL
 GWARF_result equal_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var, int type){  // the func for equal and call from read_statement_list
 GWARF_result equal_func(GWARF_result left_result, GWARF_result right_result, var_list *the_var, int type){  // the func for equal and call from read_statement_list
-    GWARF_result return_value;
+    GWARF_result return_value = GWARF_result_reset;
     int return_bool = false;
     int return_bool = false;
     char *left_func_list[] = {"__eq__", "__more__", "__less__", "__eqmore__", "__eqless__","__noteq__"};  // bool 运算符
     char *left_func_list[] = {"__eq__", "__more__", "__less__", "__eqmore__", "__eqless__","__noteq__"};  // bool 运算符
     char *right_func_list[] = {"__eq__", "__more__", "__less__", "__eqmore__", "__eqless__","__noteq__"};  // bool 运算符
     char *right_func_list[] = {"__eq__", "__more__", "__less__", "__eqmore__", "__eqless__","__noteq__"};  // bool 运算符
 
 
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
     if(left_result.value.type == OBJECT_value){  // 调用左div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         GWARF_value base_the_var = left_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3660,7 +3683,7 @@ GWARF_result equal_func(GWARF_result left_result, GWARF_result right_result, var
         }
         }
     }
     }
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
     if(right_result.value.type == OBJECT_value){  // 调用右div方法
-        GWARF_result get;
+        GWARF_result get = GWARF_result_reset;
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         GWARF_value base_the_var = right_result.value;  // 只有一个参数
         var_list *call_var = base_the_var.value.object_value->the_var;
         var_list *call_var = base_the_var.value.object_value->the_var;
 
 
@@ -3771,7 +3794,7 @@ GWARF_result equal_func(GWARF_result left_result, GWARF_result right_result, var
 // --------- traverse[iter]
 // --------- traverse[iter]
 GWARF_result traverse(statement *the_statement, var_list *the_var, bool new){  // traverse the statement
 GWARF_result traverse(statement *the_statement, var_list *the_var, bool new){  // traverse the statement
     statement *tmp = the_statement;
     statement *tmp = the_statement;
-    GWARF_result result, result2;
+    GWARF_result result, result2 = GWARF_result_reset;
     if(the_statement == NULL){
     if(the_statement == NULL){
         result.u = statement_end;  // 正常设置[正常语句结束]
         result.u = statement_end;  // 正常设置[正常语句结束]
         result.value.type = NULL_value;  // 默认设置
         result.value.type = NULL_value;  // 默认设置
@@ -3824,7 +3847,7 @@ GWARF_result traverse(statement *the_statement, var_list *the_var, bool new){  /
 
 
 GWARF_result traverse_global(statement *the_statement, var_list *the_var){  // traverse the statement[not break、broken、and others] but error
 GWARF_result traverse_global(statement *the_statement, var_list *the_var){  // traverse the statement[not break、broken、and others] but error
     statement *tmp = the_statement;
     statement *tmp = the_statement;
-    GWARF_result result;
+    GWARF_result result = GWARF_result_reset;
     if(the_statement == NULL){
     if(the_statement == NULL){
         result.u = statement_end;  // 正常设置[正常语句结束]
         result.u = statement_end;  // 正常设置[正常语句结束]
         result.value.type = NULL_value;  // 默认设置
         result.value.type = NULL_value;  // 默认设置
@@ -3847,7 +3870,7 @@ GWARF_result traverse_global(statement *the_statement, var_list *the_var){  // t
 
 
 GWARF_result traverse_get_value(statement *the_statement, var_list *the_var, var_list *out_var){  // traverse the statement[not break、broken、and others] but error
 GWARF_result traverse_get_value(statement *the_statement, var_list *the_var, var_list *out_var){  // traverse the statement[not break、broken、and others] but error
     statement *tmp = the_statement;
     statement *tmp = the_statement;
-    GWARF_result result;
+    GWARF_result result = GWARF_result_reset;
     if(the_statement == NULL){
     if(the_statement == NULL){
         result.u = statement_end;  // 正常设置[正常语句结束]
         result.u = statement_end;  // 正常设置[正常语句结束]
         result.value.type = NULL_value;  // 默认设置
         result.value.type = NULL_value;  // 默认设置

+ 23 - 7
inter/interpreter.h

@@ -8,9 +8,11 @@
 #define true 1
 #define true 1
 #define bool int
 #define bool int
 
 
-#define assignment_statement(the_statement,the_var,login_var,right_result) assignment_statement_core(the_statement,the_var,login_var,right_result,0)
-#define read_statement_list(the_statement,the_var) read_statement(the_statement,the_var,NULL)
+#define assignment_statement(the_statement,the_var,login_var,right_result) assignment_statement_core(the_statement,the_var,login_var,right_result,0,auto_public)
+#define read_statement_list(the_statement,the_var) read_statement(the_statement,the_var,NULL,lock)
 #define run_func(base_the_var,the_var,name) run_func_core(base_the_var,the_var,name,false)
 #define run_func(base_the_var,the_var,name) run_func_core(base_the_var,the_var,name,false)
+#define GWARF_value_reset {.type=NULL_value,.value.int_value=0,.lock_token=base}
+#define GWARF_result_reset {.value.type=NULL_value,.value.value.int_value=0,.value.lock_token=base}
 
 
 #define push_statement(base,token) \
 #define push_statement(base,token) \
 do{ \
 do{ \
@@ -35,6 +37,10 @@ typedef enum{
 // all value is GWARF_value
 // all value is GWARF_value
 typedef struct GWARF_value{
 typedef struct GWARF_value{
     GWARF_value_type type;
     GWARF_value_type type;
+    enum {
+        base,
+        lock,
+    } lock_token;  // 代表object、class等的访问权限 之对self和cls有效
     union
     union
     {
     {
         double double_value;  // NUMBER
         double double_value;  // NUMBER
@@ -68,6 +74,11 @@ typedef struct parameter{
 // ------------------------- var
 // ------------------------- var
 
 
 typedef struct var{
 typedef struct var{
+    enum{  // 代表变量访问权限
+        auto_public,  // 自动权限
+        public,
+        protect,
+    } lock;
     char *name;  // var name
     char *name;  // var name
     GWARF_value value;
     GWARF_value value;
     struct var *next;  // for list
     struct var *next;  // for list
@@ -196,6 +207,11 @@ typedef struct statement{
         struct{
         struct{
             char *var_name;  // return var
             char *var_name;  // return var
             struct statement *from;  // from where [double->int]
             struct statement *from;  // from where [double->int]
+            enum {
+                auto_token,  // 默认情况下auto_token是具有权限访问protetc base_var的,但不具有权限修改protect var,使用point运算符时会修改auto_token
+                public_token,
+                protect_token,
+            } lock_token;  // 如果用于赋值,则是新变量的权限,如果用于读取则是访问的权限 [默认情况 base_var访问权限不受限制,point的时候会更正访问权限]
         } base_var;
         } base_var;
 
 
         struct{
         struct{
@@ -542,10 +558,10 @@ GWARF_result div_func(GWARF_result, GWARF_result, var_list *);
 GWARF_result pow_func(GWARF_result, GWARF_result, var_list *);
 GWARF_result pow_func(GWARF_result, GWARF_result, var_list *);
 GWARF_result log_func(GWARF_result, GWARF_result, var_list *);
 GWARF_result log_func(GWARF_result, GWARF_result, var_list *);
 GWARF_result sqrt_func(GWARF_result, GWARF_result, var_list *);
 GWARF_result sqrt_func(GWARF_result, GWARF_result, var_list *);
-GWARF_result assignment_func(char *, GWARF_result, var_list *, int);
+GWARF_result assignment_func(char *, GWARF_result, var_list *, int, int);
 GWARF_result equal_func(GWARF_result, GWARF_result, var_list *, int);
 GWARF_result equal_func(GWARF_result, GWARF_result, var_list *, int);
 GWARF_result negative_func(GWARF_result, var_list *);
 GWARF_result negative_func(GWARF_result, var_list *);
-GWARF_result assignment_statement_core(statement *, var_list *, var_list *, GWARF_result, bool);
+GWARF_result assignment_statement_core(statement *, var_list *, var_list *, GWARF_result, bool, int);
 GWARF_result assignment_statement_value(statement *, var_list *, var_list *, GWARF_value);
 GWARF_result assignment_statement_value(statement *, var_list *, var_list *, GWARF_value);
 GWARF_result not_func(GWARF_result, var_list *);
 GWARF_result not_func(GWARF_result, var_list *);
 GWARF_result or_func(statement *, statement *, var_list *);
 GWARF_result or_func(statement *, statement *, var_list *);
@@ -665,7 +681,7 @@ statement *find_statement_list(int, statement_list *);
 statement_list *free_statement_list(statement_list *);
 statement_list *free_statement_list(statement_list *);
 
 
 var *make_var();
 var *make_var();
-void append_var(char *name, GWARF_value, var *);
+void append_var(char *name, GWARF_value, var *, int);
 void free_var(var *);
 void free_var(var *);
 var *get_var(char *, var *);
 var *get_var(char *, var *);
 void del_var(char *, var *);
 void del_var(char *, var *);
@@ -680,13 +696,13 @@ var_list *append_by_var_list(var_list *, var_list *);
 var_list *free_var_list(var_list *);
 var_list *free_var_list(var_list *);
 int get_var_list_len(var_list *);
 int get_var_list_len(var_list *);
 var *find_var(var_list *,int , char *);
 var *find_var(var_list *,int , char *);
-void add_var(var_list *,int , char *, GWARF_value);
+void add_var(var_list *,int , char *, GWARF_value, int);
 void del_var_var_list(var_list *,int, char *);
 void del_var_var_list(var_list *,int, char *);
 var_list *copy_var_list(var_list *);
 var_list *copy_var_list(var_list *);
 
 
 hash_var *make_hash_var();
 hash_var *make_hash_var();
 unsigned int time33(char *);
 unsigned int time33(char *);
-int login_node(char *, GWARF_value, hash_var *);
+int login_node(char *, GWARF_value, hash_var *, int);
 var *find_node(char *, hash_var *);
 var *find_node(char *, hash_var *);
 void del_var_node(char *, hash_var *);
 void del_var_node(char *, hash_var *);
 
 

+ 18 - 7
inter/var.c

@@ -9,10 +9,11 @@ var *make_var(){  // make var with base
     tmp = malloc(sizeof(var));  // get an address for base var
     tmp = malloc(sizeof(var));  // get an address for base var
     tmp->name = "";  // can't get the name for the real var
     tmp->name = "";  // can't get the name for the real var
     tmp->next = NULL;
     tmp->next = NULL;
+    tmp->lock = auto_public;
     return tmp;
     return tmp;
 }
 }
 
 
-void append_var(char *name, GWARF_value value, var *base_var){
+void append_var(char *name, GWARF_value value, var *base_var, int lock){
 
 
     int break_ = 1;  // get var[2] or not[1]
     int break_ = 1;  // get var[2] or not[1]
     var *tmp = base_var;  // iter var
     var *tmp = base_var;  // iter var
@@ -29,16 +30,26 @@ void append_var(char *name, GWARF_value value, var *base_var){
         tmp = tmp->next;  // get the next to iter
         tmp = tmp->next;  // get the next to iter
     }
     }
     if(break_ == 2){
     if(break_ == 2){
-        tmp->value = value;
+        if(tmp->lock == lock || tmp->lock != protect){  // 检查是否具有修改的权限
+            tmp->value = value;
+            if(lock != auto_public){  // 检查是否可以改变权限
+                tmp->lock = lock;
+            }
+        }
         return;
         return;
     }
     }
 
 
     var *new_tmp = make_var();
     var *new_tmp = make_var();
     tmp->next = new_tmp;
     tmp->next = new_tmp;
+    if(lock == auto_public){
+        tmp->lock = public;  // 使用自动权限
+    }
+    else{
+        new_tmp->lock = lock;
+    }
     new_tmp->name = malloc(sizeof(name));
     new_tmp->name = malloc(sizeof(name));
     strcpy(new_tmp->name, name);
     strcpy(new_tmp->name, name);
     new_tmp->value = value;
     new_tmp->value = value;
-
 }
 }
 
 
 void free_var(var *base_var){  // free the address
 void free_var(var *base_var){  // free the address
@@ -107,14 +118,14 @@ unsigned int time33(char *key){
     return (hash & 0x7FFFFFFF) % MAX_SIZE;
     return (hash & 0x7FFFFFFF) % MAX_SIZE;
 }
 }
 
 
-int login_node(char *name, GWARF_value value, hash_var *the_hash_var){
+int login_node(char *name, GWARF_value value, hash_var *the_hash_var, int lock){
     unsigned int index = time33(name);
     unsigned int index = time33(name);
     var *base_node = the_hash_var->hash[index];  // 根据下标拿base节点
     var *base_node = the_hash_var->hash[index];  // 根据下标拿base节点
     if(base_node == NULL){  // 生成基本节点
     if(base_node == NULL){  // 生成基本节点
         the_hash_var->hash[index] = make_var();
         the_hash_var->hash[index] = make_var();
         base_node = the_hash_var->hash[index];
         base_node = the_hash_var->hash[index];
     }
     }
-    append_var(name, value, base_node);
+    append_var(name, value, base_node, lock);
     return 0;
     return 0;
 }
 }
 
 
@@ -280,7 +291,7 @@ var *find_var(var_list *var_base,int from, char *name){  // find var by func get
     }
     }
 }
 }
 
 
-void add_var(var_list *var_base,int from, char *name, GWARF_value value){  // add var by func append_var in var_list[iter to find]
+void add_var(var_list *var_base,int from, char *name, GWARF_value value, int lock){  // add var by func append_var in var_list[iter to find]
     var_list *start = var_base;
     var_list *start = var_base;
     var *return_var;
     var *return_var;
     from += get_default(name, var_base->default_list);
     from += get_default(name, var_base->default_list);
@@ -290,7 +301,7 @@ void add_var(var_list *var_base,int from, char *name, GWARF_value value){  // ad
         }
         }
         start = start->next;
         start = start->next;
     }
     }
-    login_node(name, value, start->hash_var_base);
+    login_node(name, value, start->hash_var_base, lock);
 }
 }
 
 
 void del_var_var_list(var_list *var_base,int from, char *name){
 void del_var_var_list(var_list *var_base,int from, char *name){

+ 2 - 0
paser/lexical.c

@@ -177,6 +177,8 @@ int paser(int *index, p_status *status){
         match_text(p, global_paser[ACTION_PASER], "action");
         match_text(p, global_paser[ACTION_PASER], "action");
         match_text(p, global_paser[SETUP_PASER], "setup");
         match_text(p, global_paser[SETUP_PASER], "setup");
         match_text(p, global_paser[INLINE_PASER], "inline");
         match_text(p, global_paser[INLINE_PASER], "inline");
+        match_text(p, global_paser[PROTECT_PASER], "protect");
+        match_text(p, global_paser[PUBLIC_PASER], "public");
 
 
         *index = check_list(global_paser, p, status);  // 检查解析结果
         *index = check_list(global_paser, p, status);  // 检查解析结果
 
 

+ 32 - 8
paser/syntax.c

@@ -2564,7 +2564,7 @@ void element(p_status *status, token_node *list){  // 数字归约
         add_node(list, new_token);  // 压入节点
         add_node(list, new_token);  // 压入节点
         return;
         return;
     }
     }
-    else if(gett.type == VAR_PASER){  // a
+    else if(gett.type == VAR_PASER || gett.type == PROTECT_PASER || gett.type == PUBLIC_PASER){  // a
         back_one_token(list, gett);
         back_one_token(list, gett);
         get_base_token(status, list, var_token, new_token);
         get_base_token(status, list, var_token, new_token);
         if(new_token.type != NON_base_var){
         if(new_token.type != NON_base_var){
@@ -2840,16 +2840,40 @@ var_token : VAR
 void var_token(p_status *status, token_node *list){  // 数字归约
 void var_token(p_status *status, token_node *list){  // 数字归约
     fprintf(status_log, "[info][grammar]  mode status: var_token\n");
     fprintf(status_log, "[info][grammar]  mode status: var_token\n");
     token gett, new_token;
     token gett, new_token;
-
+    int lock = auto_token;
     gett = pop_node(list);  // 取得一个token
     gett = pop_node(list);  // 取得一个token
-    if(gett.type == VAR_PASER){  // var类型
+    if(gett.type == VAR_PASER || gett.type == PROTECT_PASER || gett.type == PUBLIC_PASER){  // var类型
+        if(gett.type != VAR_PASER){
+            switch (gett.type)
+            {
+            case PROTECT_PASER:
+                lock = protect_token;
+                break;
+            
+            case PUBLIC_PASER:
+                lock = public_token;
+                break;
+
+            default:
+                break;
+            }
+            get_pop_token(status, list, gett);
+            if(gett.type != COLON_PASER){
+                paser_error("Don't get ':'");
+            }
+            get_pop_token(status, list, gett);
+            if(gett.type != VAR_PASER){
+                paser_error("Don't get var");
+            }
+        }
         new_token.type = NON_base_var;
         new_token.type = NON_base_var;
 
 
         statement *code_tmp =  make_statement();
         statement *code_tmp =  make_statement();
         code_tmp->type = base_var;
         code_tmp->type = base_var;
         code_tmp->code.base_var.var_name = gett.data.text;
         code_tmp->code.base_var.var_name = gett.data.text;
         code_tmp->code.base_var.from = NULL;
         code_tmp->code.base_var.from = NULL;
-        
+        code_tmp->code.base_var.lock_token = lock;
+
         new_token.data.statement_value = code_tmp;
         new_token.data.statement_value = code_tmp;
         new_token.data_type = statement_value;
         new_token.data_type = statement_value;
 
 
@@ -2876,7 +2900,7 @@ void paser_value(p_status *status, token_node *list){  // 数字归约
     if(gett.type == INT_PASER){  // int类型
     if(gett.type == INT_PASER){  // int类型
         new_token.type = NON_base_value;
         new_token.type = NON_base_value;
 
 
-        GWARF_value tmp_value;
+        GWARF_value tmp_value = GWARF_value_reset;
         tmp_value.type = INT_value;
         tmp_value.type = INT_value;
         tmp_value.value.int_value = atoi(gett.data.text);
         tmp_value.value.int_value = atoi(gett.data.text);
 
 
@@ -2891,7 +2915,7 @@ void paser_value(p_status *status, token_node *list){  // 数字归约
     else if(gett.type == DOUBLE_PASER){
     else if(gett.type == DOUBLE_PASER){
         new_token.type = NON_base_value;
         new_token.type = NON_base_value;
 
 
-        GWARF_value tmp_value;
+        GWARF_value tmp_value = GWARF_value_reset;
         tmp_value.type = NUMBER_value;
         tmp_value.type = NUMBER_value;
         tmp_value.value.double_value = atof(gett.data.text);
         tmp_value.value.double_value = atof(gett.data.text);
 
 
@@ -2905,7 +2929,7 @@ void paser_value(p_status *status, token_node *list){  // 数字归约
     else if(gett.type == STR_PASER){
     else if(gett.type == STR_PASER){
         new_token.type = NON_base_value;
         new_token.type = NON_base_value;
 
 
-        GWARF_value tmp_value;
+        GWARF_value tmp_value = GWARF_value_reset;
         tmp_value.type = STRING_value;
         tmp_value.type = STRING_value;
         if(gett.data.text == NULL){
         if(gett.data.text == NULL){
             tmp_value.value.string = "";
             tmp_value.value.string = "";
@@ -2927,7 +2951,7 @@ void paser_value(p_status *status, token_node *list){  // 数字归约
     else if(gett.type == TRUE_PASER || gett.type == FALSE_PASER){
     else if(gett.type == TRUE_PASER || gett.type == FALSE_PASER){
         new_token.type = NON_base_value;
         new_token.type = NON_base_value;
 
 
-        GWARF_value tmp_value;
+        GWARF_value tmp_value = GWARF_value_reset;
         tmp_value.type = BOOL_value;
         tmp_value.type = BOOL_value;
         if(gett.type == TRUE_PASER){
         if(gett.type == TRUE_PASER){
             tmp_value.value.bool_value = true;
             tmp_value.value.bool_value = true;

+ 3 - 1
paser/token.h

@@ -3,7 +3,7 @@
 
 
 #include "../inter/interpreter.h"
 #include "../inter/interpreter.h"
 
 
-#define MAX_PASER_SIZE 90
+#define MAX_PASER_SIZE 92
 #define INT_PASER 0
 #define INT_PASER 0
 #define DOUBLE_PASER 1
 #define DOUBLE_PASER 1
 #define ENTER_PASER 2
 #define ENTER_PASER 2
@@ -94,6 +94,8 @@
 #define ACTION_PASER 87
 #define ACTION_PASER 87
 #define SETUP_PASER 88
 #define SETUP_PASER 88
 #define INLINE_PASER 89
 #define INLINE_PASER 89
+#define PROTECT_PASER 90
+#define PUBLIC_PASER 91
 
 
 // 获取并返回一个token
 // 获取并返回一个token
 #define get_pop_token(status,list,new_token) \
 #define get_pop_token(status,list,new_token) \