On Fri, 16 Jan 2015, Eliseo Martínez wrote:
> Hi,
>
> I’m trying to write a semantic patch to be able to find all `long`
> variables/function parameters in my code.
> I’ve tried a lot of variations, the last of them being:
>
> ```
> @@ identifier i; @@
>
> * long i;
>
> @@ identifier i, f; @@
>
> (
> * f(long i) { ... }
> |
> * f(long i, ...) { ... }
> |
> * f(..., long i, ...) { ... }
> |
> * f(..., long i) { ... }
> )
You can't put function definitions in a disjunction. But you don't need
to either. The third case will take care of everything.
julia
> ```
>
> But I get parse errors no matter what I try.
> Where’s my error?
> _______________________________________________
> Cocci mailing list
> [email protected]
> https://systeme.lip6.fr/mailman/listinfo/cocci
>
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci