forked from alex-eg/sex
walk a define's body, and parenthesise it
The body was pasted as read, so `cast' stayed a call and names kept their dashes; and fmt-c parenthesised only a function-like body, so an object-like one regrouped with the operator it was pasted under. Fixes #55.
This commit is contained in:
@@ -507,7 +507,7 @@ forms, and what remains."
|
||||
;; A target is a filename and not an identifier: GL/gl.h is a path,
|
||||
;; and unkebabify would spell it GLːgl.h
|
||||
(('include target) (list '%include target))
|
||||
(('define name . rest) `(%define ,(atom-to-fmt-c name) ,@rest))
|
||||
(('define name . body) `(%define ,(walk-expr name) ,@(map walk-expr body)))
|
||||
(else (walk-expr form))))
|
||||
|
||||
;;; Two toplevel forms are separated by a blank line only if they were
|
||||
|
||||
Reference in New Issue
Block a user