diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2023-02-01 23:54:08 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2023-02-01 23:54:08 -0300 |
commit | e27b74c9e6610527293cf10e1a4f5565b7736f10 (patch) | |
tree | 859b0c6ee5d9cf7c2a0c2a4b5f76920e22c383e1 | |
parent | 17586f249799df3f3b707e4711b6d6f82844dcea (diff) | |
download | cmamut-e27b74c9e6610527293cf10e1a4f5565b7736f10.tar.gz cmamut-e27b74c9e6610527293cf10e1a4f5565b7736f10.zip |
Add struct references to typedef list
-rw-r--r-- | cmamut.lisp | 8 |
1 files changed, 5 insertions, 3 deletions
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) |