stage4/generate_c/generate_c_base.cc
changeset 118 d4cf7ea933a4
parent 98 d0cdf1d00b74
child 139 668a54686827
equal deleted inserted replaced
117:550c3bd2df16 118:d4cf7ea933a4
   251     void *visit(boolean_literal_c *symbol) {return print_literal(symbol->type, symbol->value);}
   251     void *visit(boolean_literal_c *symbol) {return print_literal(symbol->type, symbol->value);}
   252 
   252 
   253     /* helper class for boolean_literal_c */
   253     /* helper class for boolean_literal_c */
   254     void *visit(boolean_true_c *symbol) {s4o.print("TRUE"); return NULL;}
   254     void *visit(boolean_true_c *symbol) {s4o.print("TRUE"); return NULL;}
   255     void *visit(boolean_false_c *symbol) {s4o.print("FALSE"); return NULL;}
   255     void *visit(boolean_false_c *symbol) {s4o.print("FALSE"); return NULL;}
       
   256 
       
   257     void *visit(neg_literal_c *symbol) {
       
   258       s4o.print("-");
       
   259       symbol->exp->accept(*this);
       
   260       return NULL;
       
   261     }
   256 
   262 
   257     void *visit(neg_expression_c *symbol) {
   263     void *visit(neg_expression_c *symbol) {
   258       s4o.print("-");
   264       s4o.print("-");
   259       symbol->exp->accept(*this);
   265       symbol->exp->accept(*this);
   260       return NULL;
   266       return NULL;