stage4/generate_c/generate_c_base.cc
changeset 958 7474d2cd1d6e
parent 947 aca1ab9fcb6d
child 966 cd7fa00ad774
equal deleted inserted replaced
957:4489afa5b1c5 958:7474d2cd1d6e
   325 /* B.1 - Common elements */
   325 /* B.1 - Common elements */
   326 /*************************/
   326 /*************************/
   327 /*******************************************/
   327 /*******************************************/
   328 /* B 1.1 - Letters, digits and identifiers */
   328 /* B 1.1 - Letters, digits and identifiers */
   329 /*******************************************/
   329 /*******************************************/
   330     void *visit(identifier_c *symbol) {return print_token(symbol);}
   330     void *visit(                 identifier_c *symbol) {return print_token(symbol);}
       
   331     void *visit(         poutype_identifier_c *symbol) {return print_token(symbol);}
   331     /* If you need the derived_datatype_identifier_c visitor, then you should probably be 
   332     /* If you need the derived_datatype_identifier_c visitor, then you should probably be 
   332      * inheriting from generate_c_base_and_typeid_c and not generate_c_base_c !!
   333      * inheriting from generate_c_base_and_typeid_c and not generate_c_base_c !!
   333      */
   334      */
   334     void *visit(derived_datatype_identifier_c *symbol) {ERROR; return NULL;}
   335     void *visit(derived_datatype_identifier_c *symbol) {ERROR; return NULL;}
   335 
   336 
   949    */
   950    */
   950   int implicit_id_count = symbol->anotations_map.count("generate_c_annotaton__implicit_type_id");
   951   int implicit_id_count = symbol->anotations_map.count("generate_c_annotaton__implicit_type_id");
   951   if (1  < implicit_id_count) ERROR;
   952   if (1  < implicit_id_count) ERROR;
   952   if (1 == implicit_id_count)
   953   if (1 == implicit_id_count)
   953     return symbol->anotations_map["generate_c_annotaton__implicit_type_id"]->accept(*this);
   954     return symbol->anotations_map["generate_c_annotaton__implicit_type_id"]->accept(*this);
   954   return symbol->ref_spec->accept(*this); // this is probably pointing to an identifier_c !!
   955   return symbol->ref_spec->accept(*this); // this is probably pointing to an ***_identifier_c !!
   955 }
   956 }
   956 
   957 
   957 /* ref_type_decl: identifier ':' ref_spec_init */
   958 /* ref_type_decl: identifier ':' ref_spec_init */
   958 // SYM_REF2(ref_type_decl_c, ref_type_name, ref_spec_init)
   959 // SYM_REF2(ref_type_decl_c, ref_type_name, ref_spec_init)
   959 void *visit(ref_type_decl_c *symbol) {
   960 void *visit(ref_type_decl_c *symbol) {