MetaAttribute is added to the SmPL AST. Visit it in the SmPL AST
visitor.

Signed-off-by: Jaskaran Singh <jaskaran.si...@collabora.com>
---
 parsing_cocci/visitor_ast.ml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/parsing_cocci/visitor_ast.ml b/parsing_cocci/visitor_ast.ml
index 17afc5183..315b94243 100644
--- a/parsing_cocci/visitor_ast.ml
+++ b/parsing_cocci/visitor_ast.ml
@@ -921,7 +921,8 @@ let combiner bind option_default
   and attribute a =
     let k a =
       match Ast.unwrap a with
-        Ast.Attribute(attr) -> string_mcode attr in
+        Ast.Attribute(attr) -> string_mcode attr
+      | Ast.MetaAttribute(name,_,_,_) -> meta_mcode name in
     attributefn all_functions k a
 
 
@@ -1919,7 +1920,9 @@ let rebuilder
     let k a =
       Ast.rewrap a
         (match Ast.unwrap a with
-          Ast.Attribute(attr) -> Ast.Attribute(string_mcode attr)) in
+          Ast.Attribute(attr) -> Ast.Attribute(string_mcode attr)
+       | Ast.MetaAttribute(name,constraints,keep,inherited) ->
+           Ast.MetaAttribute(meta_mcode name,constraints,keep,inherited)) in
     attributefn all_functions k a
 
   and whencode notfn alwaysfn = function
-- 
2.21.3

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to