[PATCH 1/2] vbscript/parser: Handle lack of newlines before certain End statements.

Jacek Caban jacek at codeweavers.com
Fri Sep 6 08:33:09 CDT 2019


Signed-off-by: Jacek Caban <jacek at codeweavers.com>


On 9/5/19 2:48 PM, Gabriel Ivăncescu wrote:
>   ClassBody
>       : /* empty */                                 { $$ = new_class_decl(ctx); }
> +    | FunctionDecl                                { $$ = add_class_function(ctx, new_class_decl(ctx), $1); CHECK_ERROR; }
>       | FunctionDecl StSep ClassBody                { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; }
>       /* FIXME: We should use DimDecl here to support arrays, but that conflicts with PropertyDecl. */
> +    | Storage tIdentifier                         { dim_decl_t *dim_decl = new_dim_decl(ctx, $2, FALSE, NULL); CHECK_ERROR;
> +                                                  $$ = add_dim_prop(ctx, new_class_decl(ctx), dim_decl, $1); CHECK_ERROR; }
>       | Storage tIdentifier StSep ClassBody         { dim_decl_t *dim_decl = new_dim_decl(ctx, $2, FALSE, NULL); CHECK_ERROR;
>                                                     $$ = add_dim_prop(ctx, $4, dim_decl, $1); CHECK_ERROR; }
> +    | tDIM DimDecl                                { $$ = add_dim_prop(ctx, new_class_decl(ctx), $2, 0); CHECK_ERROR; }
>       | tDIM DimDecl StSep ClassBody                { $$ = add_dim_prop(ctx, $4, $2, 0); CHECK_ERROR; }
> +    | PropertyDecl                                { $$ = add_class_function(ctx, new_class_decl(ctx), $1); CHECK_ERROR; }
>       | PropertyDecl StSep ClassBody                { $$ = add_class_function(ctx, $3, $1); CHECK_ERROR; }


I'm fine with it for now, but it would be nice to get rid of those 
duplications at some point.


Thanks,

Jacek




More information about the wine-devel mailing list