branches with status:
Name Status Last Modified Last Commit
lp:coccinelle 1 Development 2018-08-12 17:39:03 UTC 2018-08-12
4653. Keep whitespace before comments in st...

Author: Julia Lawall
Revision Date: 2018-08-12 17:39:03 UTC

Keep whitespace before comments in statements and declarations.

This consists in adding an "original" field to the MetaVals of
statements and declarations. This field is just passed around during
the matching process, but is used if the statement or declaration
metavariable ever appears in + code. If this is not done, the
whitespace in the comments all disappears, and the commented out things
run together in the result. This is illustrated by the following
command line:

spatch -test copys --macro-file-builtins soa.h

The changes required are to use this original field in
parsing_c/, to update to ignore it,
to update to add a real_strip function that keeps
comments, to update to add the original field, and to
update various other files to ignore it.

This could be done for other metavariable types if it seems to be useful.

11 of 1 result