Jacek Caban (@jacek) commented about dlls/vbscript/parser.y:
| tON tERROR tRESUME tNEXT { $$ = new_onerror_statement(ctx, @$, TRUE); CHECK_ERROR; } | tON tERROR tGOTO '0' { $$ = new_onerror_statement(ctx, @$, FALSE); CHECK_ERROR; } | tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $2); CHECK_ERROR; } - | tFOR Identifier '=' Expression tTO Expression Step_opt StSep StatementsNl_opt tNEXT - { $$ = new_forto_statement(ctx, @$, $2, $4, $6, $7, $9); CHECK_ERROR; } - | tFOR Identifier '=' Expression error + | tFOR MemberExpression '=' Expression tTO Expression Step_opt StSep StatementsNl_opt tNEXT + { if($2->obj_expr) { ctx->error_loc = @3; + ctx->hres = MAKE_VBSERROR(VBSE_INVALID_FOR_CONTROL); CHECK_ERROR; } + $$ = new_forto_statement(ctx, @$, $2->identifier, $4, $6, $7, $9);
Please follow the usual C indention here: indent `if` body and start `if` body in a new line. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10484#note_137450