write a typedef's target as a type
It fell through to the expression walk, which read (* const char) as a dereference and an array as a subscript, and died on a fn type. Fixes #53.
This commit is contained in:
@@ -194,6 +194,9 @@ forms, and what remains."
|
||||
;; path lowers to where the thing it reads from is a pointer
|
||||
(('%-> . rest) (cons '%-> (map walk-expr rest)))
|
||||
(('var . _) (walk-var form))
|
||||
;; semen has already put the target first, the way C writes it
|
||||
(('typedef type name)
|
||||
`(typedef ,(walk-type type) ,(atom-to-fmt-c name)))
|
||||
;; An expression has no room for a statement, so a comment in a
|
||||
;; cast is dropped rather than relocated.
|
||||
(('cast . rest)
|
||||
|
||||
Reference in New Issue
Block a user