MetaAttribute is added to the SmPL AST. Visit meta attributes in the
SmPL AST0 visitor.

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

diff --git a/parsing_cocci/visitor_ast0.ml b/parsing_cocci/visitor_ast0.ml
index e45f92415..0a5db947b 100644
--- a/parsing_cocci/visitor_ast0.ml
+++ b/parsing_cocci/visitor_ast0.ml
@@ -1154,7 +1154,10 @@ let visitor mode bind option_default
         (match Ast0.unwrap a with
           Ast0.Attribute(attr) ->
             let (attr_n,attr) = string_mcode attr in
-            (attr_n,Ast0.Attribute(attr))) in
+            (attr_n,Ast0.Attribute(attr))
+       | Ast0.MetaAttribute(name,constraints,pure) ->
+           let (n,name) = meta_mcode name in
+           (n,Ast0.MetaAttribute(name,constraints,pure))) in
     attributefn all_functions k a
 
   (* we only include the when string mcode w because the parameterised
-- 
2.21.3

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

Reply via email to