HCoop
/
bpt
/
coccinelle.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
coccinelle release 1.0.0-rc2
[bpt/coccinelle.git]
/
parsing_cocci
/
disjdistr.ml
diff --git
a/parsing_cocci/disjdistr.ml
b/parsing_cocci/disjdistr.ml
index
4fb19e1
..
bcd2600
100644
(file)
--- a/
parsing_cocci/disjdistr.ml
+++ b/
parsing_cocci/disjdistr.ml
@@
-215,7
+215,7
@@
and disjparam p =
and disjini i =
match Ast.unwrap i with
and disjini i =
match Ast.unwrap i with
- Ast.MetaInit(_,_,_) -> [i]
+ Ast.MetaInit(_,_,_)
| Ast.MetaInitList(_,_,_,_)
-> [i]
| Ast.InitExpr(exp) ->
let exp = disjexp exp in
List.map (function exp -> Ast.rewrap i (Ast.InitExpr(exp))) exp
| Ast.InitExpr(exp) ->
let exp = disjexp exp in
List.map (function exp -> Ast.rewrap i (Ast.InitExpr(exp))) exp
@@
-314,9
+314,10
@@
let rec disj_rule_elem r k re =
(function decl -> Ast.rewrap re (Ast.Decl(bef,allminus,decl)))
| Ast.SeqStart(brace) -> re
| Ast.SeqEnd(brace) -> re
(function decl -> Ast.rewrap re (Ast.Decl(bef,allminus,decl)))
| Ast.SeqStart(brace) -> re
| Ast.SeqEnd(brace) -> re
- | Ast.ExprStatement(exp,sem) ->
+ | Ast.ExprStatement(
Some
exp,sem) ->
orify_rule_elem re exp
orify_rule_elem re exp
- (function exp -> Ast.rewrap re (Ast.ExprStatement(exp,sem)))
+ (function exp -> Ast.rewrap re (Ast.ExprStatement(Some exp,sem)))
+ | Ast.ExprStatement(None,sem) -> re
| Ast.IfHeader(iff,lp,exp,rp) ->
orify_rule_elem re exp
(function exp -> Ast.rewrap re (Ast.IfHeader(iff,lp,exp,rp)))
| Ast.IfHeader(iff,lp,exp,rp) ->
orify_rule_elem re exp
(function exp -> Ast.rewrap re (Ast.IfHeader(iff,lp,exp,rp)))