parseerror(parser, "invalid types in assignment: cannot assign %s to %s", ty2, ty1);
}
}
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
out = (ast_expression*)ast_store_new(ctx, assignop, exprs[0], exprs[1]);
break;
case opid3('+','+','P'):
addop = INSTR_ADD_F;
else
addop = INSTR_SUB_F;
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
if (ast_istype(exprs[0], ast_entfield)) {
out = (ast_expression*)ast_binstore_new(ctx, INSTR_STOREP_F, addop,
exprs[0],
addop = INSTR_SUB_F;
subop = INSTR_ADD_F;
}
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
if (ast_istype(exprs[0], ast_entfield)) {
out = (ast_expression*)ast_binstore_new(ctx, INSTR_STOREP_F, addop,
exprs[0],
ty1, ty2);
return false;
}
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
if (ast_istype(exprs[0], ast_entfield))
assignop = type_storep_instr[exprs[0]->expression.vtype];
else
ty1, ty2);
return false;
}
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
if (ast_istype(exprs[0], ast_entfield))
assignop = type_storep_instr[exprs[0]->expression.vtype];
else
ty1, ty2);
return false;
}
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
if (ast_istype(exprs[0], ast_entfield))
assignop = type_storep_instr[exprs[0]->expression.vtype];
else
out = (ast_expression*)ast_binary_new(ctx, INSTR_BITAND, exprs[0], exprs[1]);
if (!out)
return false;
+ if (ast_istype(exprs[0], ast_value) && asvalue[0]->constant) {
+ parseerror(parser, "assignment to constant `%s`", asvalue[0]->name);
+ }
out = (ast_expression*)ast_binstore_new(ctx, assignop, INSTR_SUB_F, exprs[0], out);
break;
}