On Tue, 20 Oct 2020, Peng Liang wrote:
> Hi,
> I tried to use coccinelle to add an empty element to compound literals
> using spatch version 1.0.8 compiled with OCaml version 4.10.0.
>
> Here is my script:
> @@
> identifier a;
> identifier fld;
> expression E;
> @@
> struct A a = {
> ...,
> .fld = (struct B[]) {
> ...,
> { ..., E, ... },
> + { }
> },
> ...,
> };
>
> And I received the following error:
> minus: parse error:
> File "add-end-of-list.cocci", line 8, column 21, charpos = 97
> around = '[',
> whole content = .fld = (struct B[]) {
>
> Am I missing something?
I don't think it is supported. Even if I put [...] instead of [], it just
complains about something else (the {). I will see if it is possible to
fix.
julia
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci