equal
deleted
inserted
replaced
381 ERROR; |
381 ERROR; |
382 return NULL; |
382 return NULL; |
383 } |
383 } |
384 |
384 |
385 /* TODO: power expression... */ |
385 /* TODO: power expression... */ |
386 void *visit(power_expression_c *symbol) {ERROR; return print_binary_expression(symbol->l_exp, symbol->r_exp, " ** ");} |
386 void *visit(power_expression_c *symbol) { |
|
387 ERROR; |
|
388 return print_binary_expression(symbol->l_exp, symbol->r_exp, " ** "); |
|
389 } |
|
390 |
387 void *visit(neg_expression_c *symbol) { |
391 void *visit(neg_expression_c *symbol) { |
388 symbol_c *exp_type = search_expression_type->get_type(symbol->exp); |
392 return print_unary_expression(symbol->exp, " -"); |
389 if (search_expression_type->is_integer_type(exp_type) || search_expression_type->is_real_type(exp_type)) |
|
390 return print_unary_expression(symbol->exp, " -"); |
|
391 ERROR; |
|
392 return NULL; |
|
393 } |
393 } |
394 |
394 |
395 void *visit(not_expression_c *symbol) { |
395 void *visit(not_expression_c *symbol) { |
396 symbol_c *exp_type = search_expression_type->get_type(symbol->exp); |
396 symbol_c *exp_type = search_expression_type->get_type(symbol->exp); |
397 if (search_expression_type->is_binary_type(exp_type)) |
397 if (search_expression_type->is_binary_type(exp_type)) |