equal
deleted
inserted
replaced
1768 |
1768 |
1769 /********************************/ |
1769 /********************************/ |
1770 /* B 3.2.3 Selection Statements */ |
1770 /* B 3.2.3 Selection Statements */ |
1771 /********************************/ |
1771 /********************************/ |
1772 void *fill_candidate_datatypes_c::visit(if_statement_c *symbol) { |
1772 void *fill_candidate_datatypes_c::visit(if_statement_c *symbol) { |
1773 /* MANU: |
|
1774 * IF statement accept only BOOL type. We intersect with BOOL type to validate current if condition |
|
1775 * Example: |
|
1776 * IF 1 THEN ---> ok |
|
1777 * IF 5 THEN ---> not ok |
|
1778 * IF 1 OR 1 THEN ---> ok |
|
1779 * IF 1 OR 5 THEN ---> not ok |
|
1780 * IF SHL() THEN ---> ok if shl return BOOL |
|
1781 * IF INT_TO_REAL() ---> not ok |
|
1782 */ |
|
1783 symbol->expression->accept(*this); |
1773 symbol->expression->accept(*this); |
1784 if (NULL != symbol->statement_list) |
1774 if (NULL != symbol->statement_list) |
1785 symbol->statement_list->accept(*this); |
1775 symbol->statement_list->accept(*this); |
1786 if (NULL != symbol->elseif_statement_list) |
1776 if (NULL != symbol->elseif_statement_list) |
1787 symbol->elseif_statement_list->accept(*this); |
1777 symbol->elseif_statement_list->accept(*this); |