MetaAttribute is added to the SmPL AST. Reflect these changes in
unparse_cocci.ml.

Signed-off-by: Jaskaran Singh <[email protected]>
---
 parsing_c/unparse_cocci.ml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/parsing_c/unparse_cocci.ml b/parsing_c/unparse_cocci.ml
index e544336d0..7be18bf1c 100644
--- a/parsing_c/unparse_cocci.ml
+++ b/parsing_c/unparse_cocci.ml
@@ -714,6 +714,12 @@ and print_attribute_list attrs =
 and print_attribute attr =
   match Ast.unwrap attr with
     Ast.Attribute(a) -> mcode print_string a
+  | Ast.MetaAttribute(name,_,_,_) ->
+      handle_metavar name
+       (function
+           Ast_c.MetaAttributeVal a ->
+              pretty_print_c.Pretty_print_c.attribute a
+          | _ -> error name attr "attribute value expected")
 
 and typeC ty =
   match Ast.unwrap ty with
-- 
2.21.3

_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to