[Linux-kernel-mentees] [PATCH 24/27] tools: spgen: Reflect struct end attributes

Jaskaran Singh jaskaransingh7654321 at gmail.com
Sun May 31 15:26:18 UTC 2020


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

Signed-off-by: Jaskaran Singh <jaskaransingh7654321 at gmail.com>
---
 tools/spgen/source/position_generator.ml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/spgen/source/position_generator.ml b/tools/spgen/source/position_generator.ml
index deca6f73..e70a47b4 100644
--- a/tools/spgen/source/position_generator.ml
+++ b/tools/spgen/source/position_generator.ml
@@ -412,8 +412,8 @@ let rec declaration_pos decl snp
       let _ = type_pos ty snp in (* sanity check *)
       let constructor ~id = Ast0.UnInit(st, ty, id, attr, sem) in
       id_wrap ~id ~constructor snp
-  | Ast0.TyDecl (t, sem) ->
-      let c ~item ~mc = Ast0.TyDecl(item, mc) in
+  | Ast0.TyDecl (t, attr, sem) ->
+      let c ~item ~mc = Ast0.TyDecl(item, attr, mc) in
       let alt() = mcode_wrap ~mc:sem ~constructor:(c ~item:t) snp in
       item_wrap ~item:t ~item_posfn:type_pos ~constructor:(c ~mc:sem) ~alt snp
   | Ast0.Typedef (tm, tc, tc2, sem) ->
-- 
2.21.1



More information about the Linux-kernel-mentees mailing list