cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] How to concatenate identifier with text?
@ 2019-05-24 19:13 Timur Tabi
  2019-05-24 19:36 ` Timur Tabi
  2019-05-24 19:38 ` Julia Lawall
  0 siblings, 2 replies; 8+ messages in thread
From: Timur Tabi @ 2019-05-24 19:13 UTC (permalink / raw)
  To: cocci

@@
identifier func;
@@
func(...) {
<+...
     .... stuff
+   goto func_exit;
+}
...+>
}

So if I have this code:

void myfunc(int x)
{
}

I want it to look like this:

void myfunc(int x)
{
    goto myfunc_exit;
}

My problem is that cocci takes "func_exit" literally.  I tried
func##_exit, but that didn't work.  How do I make this work?
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-12  7:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 19:13 [Cocci] How to concatenate identifier with text? Timur Tabi
2019-05-24 19:36 ` Timur Tabi
2019-05-24 19:38   ` Julia Lawall
2019-06-11 21:51     ` Timur Tabi
2019-06-11 21:58       ` Timur Tabi
2019-06-12  7:12         ` [Cocci] Wider usage of “fresh identifiers”? Markus Elfring
2019-06-12  5:25       ` [Cocci] How to concatenate identifier with text? Julia Lawall
2019-05-24 19:38 ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).