equal
deleted
inserted
replaced
591 |
591 |
592 /* subscript_list ',' subscript */ |
592 /* subscript_list ',' subscript */ |
593 // SYM_LIST(subscript_list_c) |
593 // SYM_LIST(subscript_list_c) |
594 void *print_datatypes_error_c::visit(subscript_list_c *symbol) { |
594 void *print_datatypes_error_c::visit(subscript_list_c *symbol) { |
595 for (int i = 0; i < symbol->n; i++) { |
595 for (int i = 0; i < symbol->n; i++) { |
596 if (NULL == symbol->elements[i]->datatype) |
596 int start_error_count = error_count; |
|
597 symbol->elements[i]->accept(*this); |
|
598 /* I (mjs) do not believe that the following error message will ever get printed, but lets play it safe and leave it in... */ |
|
599 if ((start_error_count == error_count) && (NULL == symbol->elements[i]->datatype)) |
597 STAGE3_ERROR(0, symbol, symbol, "Invalid data type for array subscript field."); |
600 STAGE3_ERROR(0, symbol, symbol, "Invalid data type for array subscript field."); |
598 } |
601 } |
599 return NULL; |
602 return NULL; |
600 } |
603 } |
601 |
604 |