From e27b74c9e6610527293cf10e1a4f5565b7736f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Wed, 1 Feb 2023 23:54:08 -0300 Subject: Add struct references to typedef list --- cmamut.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cmamut.lisp') diff --git a/cmamut.lisp b/cmamut.lisp index 6f20d3e..55784cc 100644 --- a/cmamut.lisp +++ b/cmamut.lisp @@ -181,6 +181,7 @@ (let ((tag (gethash "tag" (aref spec i)))) (cond ((string= tag "function") (push (aref spec i) (spec-functions s))) + ((string= tag "typedef") (let ((internal-type (gethash "type" (aref spec i)))) (cond ((string= (gethash "tag" internal-type) "struct") @@ -191,8 +192,9 @@ (json:from-string (format nil "{ \"tag\": \":struct\", \"name\": ~s }" - (gethash "name" (aref spec i)))))) - (t (push (aref spec i) (spec-typedefs s)))))) + (gethash "name" (aref spec i))))))) + (push (aref spec i) (spec-typedefs s)))) + ((string= tag "struct") (push (aref spec i) (spec-structs s))) ((string= tag "enum") @@ -200,7 +202,7 @@ ((string= tag "union") (push (aref spec i) (spec-unions s))) (t)))) - s)) + s)) (defun codegen (spec) (clrhash enum-references) -- cgit v1.2.3