Struct end attributes are added to the SmPL AST. Reflect these changes
in ast0toast.ml.

Signed-off-by: Jaskaran Singh <jaskaransingh7654...@gmail.com>
---
 parsing_cocci/ast0toast.ml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/parsing_cocci/ast0toast.ml b/parsing_cocci/ast0toast.ml
index 30e27cc5..cba32af6 100644
--- a/parsing_cocci/ast0toast.ml
+++ b/parsing_cocci/ast0toast.ml
@@ -679,9 +679,10 @@ and declaration d =
        let ini = initialiser ini in
        let sem = mcode sem in
        Ast.MacroDeclInit(stg,name,lp,args,rp,eq,ini,sem)
-    | Ast0.TyDecl(ty,sem) ->
+    | Ast0.TyDecl(ty,attr,sem) ->
        let allminus = check_allminus.VT0.combiner_rec_declaration d in
-       Ast.TyDecl(typeC allminus ty,mcode sem)
+       let attr = List.map mcode attr in
+       Ast.TyDecl(typeC allminus ty,attr,mcode sem)
     | Ast0.Typedef(stg,ty,id,sem) ->
        let allminus = check_allminus.VT0.combiner_rec_declaration d in
        let id = typeC allminus id in
-- 
2.21.1

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

Reply via email to