Add the MetaAttribute and MetaAttributeDecl consturctors the SmPL AST.

Signed-off-by: Jaskaran Singh <[email protected]>
---
 parsing_cocci/ast_cocci.ml  | 3 +++
 parsing_cocci/ast_cocci.mli | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/parsing_cocci/ast_cocci.ml b/parsing_cocci/ast_cocci.ml
index 666629c58..656c3d929 100644
--- a/parsing_cocci/ast_cocci.ml
+++ b/parsing_cocci/ast_cocci.ml
@@ -128,6 +128,7 @@ and metavar =
   | MetaPosDecl of arity * meta_name (* name *)
   | MetaComDecl of arity * meta_name (* name *)
   | MetaFmtDecl of arity * meta_name (* name *)
+  | MetaAttributeDecl of arity * meta_name (* name *)
   | MetaFragListDecl of arity * meta_name (* name *) * list_len (*len*)
   | MetaAnalysisDecl of string * meta_name (* name *)
   | MetaDeclarerDecl of arity * meta_name (* name *)
@@ -626,6 +627,7 @@ and fninfo =
 
 and base_attr =
     Attribute of string mcode
+  | MetaAttribute of meta_name mcode * constraints * keep_binding * inherited
 
 and attr = base_attr wrap
 
@@ -914,6 +916,7 @@ let get_meta_name = function
   | MetaPosDecl(_ar,nm) -> nm
   | MetaComDecl(_ar,nm) -> nm
   | MetaFmtDecl(_ar,nm) -> nm
+  | MetaAttributeDecl(_ar,nm) -> nm
   | MetaFragListDecl(_ar,nm,_nm1) -> nm
   | MetaAnalysisDecl(_code,nm) -> nm
   | MetaDeclarerDecl(_ar,nm) -> nm
diff --git a/parsing_cocci/ast_cocci.mli b/parsing_cocci/ast_cocci.mli
index 983449123..9495e83c8 100644
--- a/parsing_cocci/ast_cocci.mli
+++ b/parsing_cocci/ast_cocci.mli
@@ -113,6 +113,7 @@ and metavar =
   | MetaPosDecl of arity * meta_name (* name *)
   | MetaComDecl of arity * meta_name (* name *)
   | MetaFmtDecl of arity * meta_name (* name *)
+  | MetaAttributeDecl of arity * meta_name (* name *)
   | MetaFragListDecl of arity * meta_name (* name *) * list_len (*len*)
   | MetaAnalysisDecl of string * meta_name (* name *)
   | MetaDeclarerDecl of arity * meta_name (* name *)
@@ -606,6 +607,7 @@ and fninfo =
 
 and base_attr =
     Attribute of string mcode
+  | MetaAttribute of meta_name mcode * constraints * keep_binding * inherited
 
 and attr = base_attr wrap
 
-- 
2.21.3

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

Reply via email to