absyntax_utils/spec_init_separator.cc
changeset 945 477393b00f95
parent 912 252a69d6ecae
child 958 7474d2cd1d6e
equal deleted inserted replaced
943:566414d7ba1f 945:477393b00f95
    72 
    72 
    73 /*******************************************/
    73 /*******************************************/
    74 /* B 1.1 - Letters, digits and identifiers */
    74 /* B 1.1 - Letters, digits and identifiers */
    75 /*******************************************/
    75 /*******************************************/
    76 // SYM_TOKEN(identifier_c)
    76 // SYM_TOKEN(identifier_c)
    77 void *spec_init_sperator_c::visit(identifier_c *symbol) {
    77 /* visitor for identifier_c is necessary because spec_init_sperator_c will be called to analyse PROGRAM identfiers,
       
    78  * which are still transformed into identfier_c, instead of a derived_datatype_identifier_c
       
    79  */
       
    80 void *spec_init_sperator_c::visit(                 identifier_c *symbol) {
       
    81   TRACE("spec_init_sperator_c::identifier_c");
       
    82   switch (search_what) {
       
    83     /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */
       
    84     case search_spec: return symbol;
       
    85     case search_init: return NULL;
       
    86   }
       
    87   ERROR; /* should never occur */
       
    88   return NULL;
       
    89   }
       
    90   
       
    91   
       
    92 void *spec_init_sperator_c::visit(derived_datatype_identifier_c *symbol) {
    78   TRACE("spec_init_sperator_c::identifier_c");
    93   TRACE("spec_init_sperator_c::identifier_c");
    79   switch (search_what) {
    94   switch (search_what) {
    80     /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */
    95     /* if we ever get called sith a simple identifier_c, then it must be a previously declared type... */
    81     case search_spec: return symbol;
    96     case search_spec: return symbol;
    82     case search_init: return NULL;
    97     case search_init: return NULL;