931 void *print_datatypes_error_c::visit( LT_operator_c *symbol) {return print_binary_operator_errors( "LT" , symbol);} |
931 void *print_datatypes_error_c::visit( LT_operator_c *symbol) {return print_binary_operator_errors( "LT" , symbol);} |
932 void *print_datatypes_error_c::visit( LE_operator_c *symbol) {return print_binary_operator_errors( "LE" , symbol);} |
932 void *print_datatypes_error_c::visit( LE_operator_c *symbol) {return print_binary_operator_errors( "LE" , symbol);} |
933 void *print_datatypes_error_c::visit( NE_operator_c *symbol) {return print_binary_operator_errors( "NE" , symbol);} |
933 void *print_datatypes_error_c::visit( NE_operator_c *symbol) {return print_binary_operator_errors( "NE" , symbol);} |
934 |
934 |
935 |
935 |
936 void *print_datatypes_error_c::visit(CAL_operator_c *symbol) { |
|
937 return NULL; |
|
938 } |
|
939 |
936 |
940 |
937 |
941 void *print_datatypes_error_c::handle_conditional_flow_control_IL_instruction(symbol_c *symbol, const char *oper) { |
938 void *print_datatypes_error_c::handle_conditional_flow_control_IL_instruction(symbol_c *symbol, const char *oper) { |
942 if (NULL == symbol->datatype) |
939 if (NULL == symbol->datatype) |
943 STAGE3_ERROR(0, symbol, symbol, "%s operator must be preceded by an IL instruction producing a BOOL value.", oper); |
940 STAGE3_ERROR(0, symbol, symbol, "%s operator must be preceded by an IL instruction producing a BOOL value.", oper); |
944 return NULL; |
941 return NULL; |
945 } |
942 } |
946 |
943 |
947 void *print_datatypes_error_c::visit(CALC_operator_c *symbol) { |
944 void *print_datatypes_error_c::visit( CAL_operator_c *symbol) {return NULL;} |
948 return handle_conditional_flow_control_IL_instruction(symbol, "CALC"); |
945 void *print_datatypes_error_c::visit( CALC_operator_c *symbol) {return handle_conditional_flow_control_IL_instruction(symbol, "CALC" );} |
949 } |
946 void *print_datatypes_error_c::visit(CALCN_operator_c *symbol) {return handle_conditional_flow_control_IL_instruction(symbol, "CALCN");} |
950 |
947 void *print_datatypes_error_c::visit( RET_operator_c *symbol) {return NULL;} |
951 void *print_datatypes_error_c::visit(CALCN_operator_c *symbol) { |
948 void *print_datatypes_error_c::visit( RETC_operator_c *symbol) {return handle_conditional_flow_control_IL_instruction(symbol, "RETC" );} |
952 return handle_conditional_flow_control_IL_instruction(symbol, "CALCN"); |
949 void *print_datatypes_error_c::visit(RETCN_operator_c *symbol) {return handle_conditional_flow_control_IL_instruction(symbol, "RETCN");} |
953 } |
950 void *print_datatypes_error_c::visit( JMP_operator_c *symbol) {return NULL;} |
954 |
951 void *print_datatypes_error_c::visit( JMPC_operator_c *symbol) {return handle_conditional_flow_control_IL_instruction(symbol, "JMPC" );} |
955 void *print_datatypes_error_c::visit(RET_operator_c *symbol) { |
952 void *print_datatypes_error_c::visit(JMPCN_operator_c *symbol) {return handle_conditional_flow_control_IL_instruction(symbol, "JMPCN");} |
956 return NULL; |
953 |
957 } |
954 |
958 |
|
959 void *print_datatypes_error_c::visit(RETC_operator_c *symbol) { |
|
960 return handle_conditional_flow_control_IL_instruction(symbol, "RETC"); |
|
961 } |
|
962 |
|
963 void *print_datatypes_error_c::visit(RETCN_operator_c *symbol) { |
|
964 return handle_conditional_flow_control_IL_instruction(symbol, "RETCN"); |
|
965 } |
|
966 |
|
967 void *print_datatypes_error_c::visit(JMP_operator_c *symbol) { |
|
968 return NULL; |
|
969 } |
|
970 |
|
971 void *print_datatypes_error_c::visit(JMPC_operator_c *symbol) { |
|
972 return handle_conditional_flow_control_IL_instruction(symbol, "JMPC"); |
|
973 } |
|
974 |
|
975 void *print_datatypes_error_c::visit(JMPCN_operator_c *symbol) { |
|
976 return handle_conditional_flow_control_IL_instruction(symbol, "JMPCN"); |
|
977 } |
|
978 |
955 |
979 /* Symbol class handled together with function call checks */ |
956 /* Symbol class handled together with function call checks */ |
980 // void *visit(il_assign_operator_c *symbol, variable_name); |
957 // void *visit(il_assign_operator_c *symbol, variable_name); |
981 /* Symbol class handled together with function call checks */ |
958 /* Symbol class handled together with function call checks */ |
982 // void *visit(il_assign_operator_c *symbol, option, variable_name); |
959 // void *visit(il_assign_operator_c *symbol, option, variable_name); |