Struct end attributes are added to the SmPL AST. Print these changes in pretty_print_cocci.ml.
Signed-off-by: Jaskaran Singh <[email protected]> --- parsing_cocci/pretty_print_cocci.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parsing_cocci/pretty_print_cocci.ml b/parsing_cocci/pretty_print_cocci.ml index e554a6df..aaea3f9d 100644 --- a/parsing_cocci/pretty_print_cocci.ml +++ b/parsing_cocci/pretty_print_cocci.ml @@ -580,7 +580,11 @@ and declaration d = close_box(); mcode print_string rp; print_string " "; mcode print_string eq; print_string " "; initialiser ini; mcode print_string sem - | Ast.TyDecl(ty,sem) -> fullType ty; mcode print_string sem + | Ast.TyDecl(ty,attr,sem) -> + fullType ty; + (if not (attr = []) then print_string " "); + print_between print_space (mcode print_string) attr; + mcode print_string sem | Ast.Typedef(stg,ty,id,sem) -> mcode print_string stg; print_string " "; print_named_type ty (fun _ -> typeC id); -- 2.21.1 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
