1042 /* B.3 - Language ST (Structured Text) */ |
1042 /* B.3 - Language ST (Structured Text) */ |
1043 /***************************************/ |
1043 /***************************************/ |
1044 /***********************/ |
1044 /***********************/ |
1045 /* B 3.1 - Expressions */ |
1045 /* B 3.1 - Expressions */ |
1046 /***********************/ |
1046 /***********************/ |
|
1047 /* SYM_REF1(deref_expression_c, exp) --> an extension to the IEC 61131-3 standard - based on the IEC 61131-3 v3 standard. Returns address of the varible! */ |
|
1048 void *print_datatypes_error_c::visit(deref_expression_c *symbol) { |
|
1049 symbol->exp->accept(*this); |
|
1050 /* we should really check whether the expression is merely a variable. For now, leave it for the future! */ |
|
1051 if ((symbol->candidate_datatypes.size() == 0) && (symbol->exp->candidate_datatypes.size() > 0)) |
|
1052 STAGE3_ERROR(0, symbol, symbol, "DREF operator must be used with a value of type REF_TO."); |
|
1053 return NULL; |
|
1054 } |
|
1055 |
1047 /* SYM_REF1(ref_expression_c, exp) --> an extension to the IEC 61131-3 standard - based on the IEC 61131-3 v3 standard. Returns address of the varible! */ |
1056 /* SYM_REF1(ref_expression_c, exp) --> an extension to the IEC 61131-3 standard - based on the IEC 61131-3 v3 standard. Returns address of the varible! */ |
1048 void *print_datatypes_error_c::visit( ref_expression_c *symbol) { |
1057 void *print_datatypes_error_c::visit( ref_expression_c *symbol) { |
1049 symbol->exp->accept(*this); |
1058 symbol->exp->accept(*this); |
1050 /* we should really check whether the expression is merely a variable. For now, leave it for the future! */ |
1059 /* we should really check whether the expression is merely a variable. For now, leave it for the future! */ |
1051 if ((symbol->candidate_datatypes.size() == 0) && (symbol->exp->candidate_datatypes.size() > 0)) |
1060 if ((symbol->candidate_datatypes.size() == 0) && (symbol->exp->candidate_datatypes.size() > 0)) |