Hi Robert,
On 25.09.2020 11:30, Robert Wilhelm wrote:
@@ -197,7 +197,10 @@ SimpleStatement | tCALL UnaryExpression { $$ = new_call_statement(ctx, @$, TRUE, $2); CHECK_ERROR; } | CallExpression '=' Expression { $$ = new_assign_statement(ctx, @$, $1, $3); CHECK_ERROR; }
- | tDIM DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; }
- | tDIM DimDeclList { $$ = new_dim_statement(ctx, @$, STAT_DIM, $2); CHECK_ERROR; }
- | tPRIVATE DimDeclList { $$ = new_dim_statement(ctx, @$, STAT_PRIVATE, $2); CHECK_ERROR; }
- | tPUBLIC DimDeclList { $$ = new_dim_statement(ctx, @$, STAT_PUBLIC, $2); CHECK_ERROR; }
I wonder if it would fit better in SourceElements. It would guarantee that it's parsed only in the global code and the check in compile_dim_statement would not be needed.
BTW, it should probably affect places like ScriptDisp_GetTypeInfo, but we can leave it for now. It would be probably easier to do after switching to CreateTypeInfo.
Thanks,
Jacek