stage4/generate_c/generate_c.cc
changeset 667 bd1360f29f15
parent 661 f537c3315f83
parent 632 76c3d707ffa1
child 762 a3d917474ae4
equal deleted inserted replaced
666:8ba9ec4bae50 667:bd1360f29f15
   350   if (NULL == symbol) return 0;
   350   if (NULL == symbol) return 0;
   351   
   351   
   352   interval_c *interval = dynamic_cast<interval_c *>(symbol);
   352   interval_c *interval = dynamic_cast<interval_c *>(symbol);
   353   duration_c *duration = dynamic_cast<duration_c *>(symbol);
   353   duration_c *duration = dynamic_cast<duration_c *>(symbol);
   354   
   354   
   355   if ((NULL == interval) && (NULL == duration)) ERROR;
   355   if ((NULL == interval) && (NULL == duration))
       
   356   	  {STAGE4_ERROR(symbol, symbol, "This type of interval value is not currently supported"); ERROR;}
   356 
   357 
   357   if (NULL != duration) {
   358   if (NULL != duration) {
   358     /* SYM_REF2(duration_c, neg, interval) */
   359     /* SYM_REF2(duration_c, neg, interval) */
   359     if (duration->neg != NULL)
   360     if (duration->neg != NULL)
   360       {STAGE4_ERROR(duration, duration, "Negative TIME literals are not currently supported"); ERROR;}
   361       {STAGE4_ERROR(duration, duration, "Negative TIME literals for interval are not currently supported"); ERROR;}
   361     return calculate_time(duration->interval);
   362     return calculate_time(duration->interval);
   362   }
   363   }
   363 
   364 
   364   if (NULL != interval) {
   365   if (NULL != interval) {
   365     /* SYM_REF5(interval_c, days, hours, minutes, seconds, milliseconds) */
   366     /* SYM_REF5(interval_c, days, hours, minutes, seconds, milliseconds) */