HCoop
/
bpt
/
coccinelle.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
permit multiline comments and strings in macros
[bpt/coccinelle.git]
/
demos
/
first.cocci
1
@initialize:python@
2
3
first = 0
4
5
@first_fct@
6
type T;
7
identifier f;
8
position p;
9
@@
10
11
T f@p (...) {...}
12
13
@script:python@
14
p << first_fct.p;
15
@@
16
17
if p[0].line > first and first == 0:
18
first = p[0].line
19
else:
20
cocci.include_match(False)
21
22
@@
23
type T;
24
identifier f;
25
position first_fct.p;
26
@@
27
28
+#include <foo.h>
29
30
T f@p (...) {...}