stage4/generate_cc/search_var_instance_decl.cc
changeset 26 fd67f54e64e1
parent 25 e6a841e365b7
child 28 5b170c9ce134
equal deleted inserted replaced
25:e6a841e365b7 26:fd67f54e64e1
   149       current_vartype = private_vt;
   149       current_vartype = private_vt;
   150       void *res = symbol->var_init_decl_list->accept(*this);
   150       void *res = symbol->var_init_decl_list->accept(*this);
   151       if (res == NULL) {
   151       if (res == NULL) {
   152         current_vartype = none_vt;
   152         current_vartype = none_vt;
   153       }
   153       }
   154       return NULL;
   154       return res;
   155     }
   155     }
   156 
   156 
   157 /*  VAR RETAIN var_init_decl_list END_VAR */
   157 /*  VAR RETAIN var_init_decl_list END_VAR */
   158     void *visit(retentive_var_declarations_c *symbol) {
   158     void *visit(retentive_var_declarations_c *symbol) {
   159       current_vartype = private_vt;
   159       current_vartype = private_vt;
   160       void *res = symbol->var_init_decl_list->accept(*this);
   160       void *res = symbol->var_init_decl_list->accept(*this);
   161       if (res == NULL) {
   161       if (res == NULL) {
   162         current_vartype = none_vt;
   162         current_vartype = none_vt;
   163       }
   163       }
   164       return NULL;
   164       return res;
   165     }
   165     }
   166 
   166 
   167 /*  VAR [CONSTANT|RETAIN|NON_RETAIN] located_var_decl_list END_VAR */
   167 /*  VAR [CONSTANT|RETAIN|NON_RETAIN] located_var_decl_list END_VAR */
   168 /* option -> may be NULL ! */
   168 /* option -> may be NULL ! */
   169 //SYM_REF2(located_var_declarations_c, option, located_var_decl_list)
   169 //SYM_REF2(located_var_declarations_c, option, located_var_decl_list)
   171       current_vartype = located_vt;
   171       current_vartype = located_vt;
   172       void *res = symbol->located_var_decl_list->accept(*this);
   172       void *res = symbol->located_var_decl_list->accept(*this);
   173       if (res == NULL) {
   173       if (res == NULL) {
   174         current_vartype = none_vt;
   174         current_vartype = none_vt;
   175       }
   175       }
   176       return NULL;
   176       return res;
   177     }
   177     }
   178 
   178 
   179 /*| VAR_EXTERNAL [CONSTANT] external_declaration_list END_VAR */
   179 /*| VAR_EXTERNAL [CONSTANT] external_declaration_list END_VAR */
   180 /* option -> may be NULL ! */
   180 /* option -> may be NULL ! */
   181 //SYM_REF2(external_var_declarations_c, option, external_declaration_list)
   181 //SYM_REF2(external_var_declarations_c, option, external_declaration_list)
   183       current_vartype = external_vt;
   183       current_vartype = external_vt;
   184       void *res = symbol->external_declaration_list->accept(*this);
   184       void *res = symbol->external_declaration_list->accept(*this);
   185       if (res == NULL) {
   185       if (res == NULL) {
   186         current_vartype = none_vt;
   186         current_vartype = none_vt;
   187       }
   187       }
   188       return NULL;
   188       return res;
   189     }
   189     }
   190 
   190 
   191 /* var1_list is one of the following...
   191 /* var1_list is one of the following...
   192  *    simple_spec_init_c *
   192  *    simple_spec_init_c *
   193  *    subrange_spec_init_c *
   193  *    subrange_spec_init_c *