stage3/datatype_functions.cc
changeset 556 af3e378e98f9
parent 517 889f4e577964
child 603 a45a62dd6df9
equal deleted inserted replaced
555:da6e089d0006 556:af3e378e98f9
    23  */
    23  */
    24 
    24 
    25 #include "datatype_functions.hh"
    25 #include "datatype_functions.hh"
    26 #include "../absyntax_utils/absyntax_utils.hh"
    26 #include "../absyntax_utils/absyntax_utils.hh"
    27 #include <vector>
    27 #include <vector>
    28 // #include <algorithm>
    28 
    29 
    29 
    30 
    30 
    31 
    31 
    32 
    32 
    33 
    33 
    35 
    35 
    36 const char *elementary_type_c::to_string(symbol_c *symbol) {
    36 const char *elementary_type_c::to_string(symbol_c *symbol) {
    37   if (NULL == singleton)    singleton = new elementary_type_c;
    37   if (NULL == singleton)    singleton = new elementary_type_c;
    38   if (NULL == singleton)    ERROR;
    38   if (NULL == singleton)    ERROR;
    39   const char *res           = (const char *)symbol->accept(*singleton);
    39   const char *res           = (const char *)symbol->accept(*singleton);
    40   if (NULL == res) {
    40   if (NULL == res)          ERROR;
    41 	  int i = 1;
       
    42   }
       
    43   return res;
    41   return res;
    44 }
    42 }
    45 
    43 
    46 
    44 
    47 
    45