ParenType and FunctionType are now added to the SmPL ASTs. Add cases for these types in unify_ast.ml.
Signed-off-by: Jaskaran Singh <jaskaransingh7654...@gmail.com> --- parsing_cocci/unify_ast.ml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/parsing_cocci/unify_ast.ml b/parsing_cocci/unify_ast.ml index d4ad3030..de86b1d3 100644 --- a/parsing_cocci/unify_ast.ml +++ b/parsing_cocci/unify_ast.ml @@ -336,6 +336,14 @@ and unify_typeC t1 t2 = unify_fullType tya tyb && unify_dots unify_parameterTypeDef pdots paramsa paramsb else false + | (Ast.ParenType(lpa,tya,rpa),Ast.ParenType(lpb,tyb,rpb)) -> + unify_fullType tya tyb && unify_mcode lpa lpb && unify_mcode rpa rpb + | (Ast.FunctionType(tya,lpa,paramsa,rpa), + Ast.FunctionType(tyb,lpb,paramsb,rpb)) -> + unify_fullType tya tyb && + unify_mcode lpa lpb && + unify_dots unify_parameterTypeDef pdots paramsa paramsb && + unify_mcode rpa rpb | (Ast.Array(ty1,lb1,e1,rb1),Ast.Array(ty2,lb2,e2,rb2)) -> unify_fullType ty1 ty2 && unify_option unify_expression e1 e2 | (Ast.Decimal(dec1,lp1,len1,comma1,prec_opt1,rp1), -- 2.21.1 _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci