Macrodecl attributes are added to the SmPL AST. Reflect these changes in pretty_print_cocci.ml.
Signed-off-by: Jaskaran Singh <[email protected]> --- parsing_cocci/pretty_print_cocci.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/parsing_cocci/pretty_print_cocci.ml b/parsing_cocci/pretty_print_cocci.ml index 7628882b..0046737e 100644 --- a/parsing_cocci/pretty_print_cocci.ml +++ b/parsing_cocci/pretty_print_cocci.ml @@ -565,10 +565,13 @@ and declaration d = parameter_list params; varargs va; close_box(); mcode print_string rp1; mcode print_string sem - | Ast.MacroDecl(stg,name,lp,args,rp,sem) -> + | Ast.MacroDecl(stg,name,lp,args,rp,attr,sem) -> print_option (mcode storage) stg; ident name; mcode print_string_box lp; dots (function _ -> ()) expression args; - close_box(); mcode print_string rp; mcode print_string sem + close_box(); mcode print_string rp; + (if not (attr = []) then print_string " "); + print_between print_space (mcode print_string) attr; + mcode print_string sem | Ast.MacroDeclInit(stg,name,lp,args,rp,eq,ini,sem) -> print_option (mcode storage) stg; ident name; mcode print_string_box lp; dots (function _ -> ()) expression args; -- 2.21.1 _______________________________________________ Cocci mailing list [email protected] https://systeme.lip6.fr/mailman/listinfo/cocci
