Re: [Cocci] Capturing comments / whitespace with statement list?

2019-02-21 Thread Markus Elfring
> Metavariables lose all of their whitespace and comments, Would you like to reconsider such details because of information from the documentation? “Coccinelle is a tool to help automate repetitive source-to-source style-preserving program transformations on C source code, like for instance to

Re: [Cocci] Capturing comments / whitespace with statement list?

2019-02-20 Thread Michael Stefaniuc
On 2/20/19 8:54 PM, Julia Lawall wrote: > > > On Wed, 20 Feb 2019, Michael Stefaniuc wrote: > >> Hello, >> >> is there a way to capture in a statement list the comments and empty >> lines between statements? >> >> I've got asked for scripting help to merge a ton of helper functions >> into

Re: [Cocci] Capturing comments / whitespace with statement list?

2019-02-20 Thread Julia Lawall
On Wed, 20 Feb 2019, Michael Stefaniuc wrote: > Hello, > > is there a way to capture in a statement list the comments and empty > lines between statements? > > I've got asked for scripting help to merge a ton of helper functions > into their only caller. > > Of course it is trivial to do with

[Cocci] Capturing comments / whitespace with statement list?

2019-02-20 Thread Michael Stefaniuc
Hello, is there a way to capture in a statement list the comments and empty lines between statements? I've got asked for scripting help to merge a ton of helper functions into their only caller. Of course it is trivial to do with coccinelle. But the comments and empty lines get lost in the