fix FUNCTION: prettyprint when function has no arguments

db4
Joe Groff 2009-09-16 10:24:03 -05:00
parent 21c09ab97a
commit b403ba5c17
1 changed files with 5 additions and 3 deletions

View File

@ -36,9 +36,11 @@ M: typedef-word synopsis*
[ pprint-c-type ] [ text ] bi* ;
: pprint-function-args ( word -- )
[ def>> fourth ] [ stack-effect in>> ] bi zip unclip-last
[ [ first2 "," append pprint-function-arg ] each ] dip
first2 pprint-function-arg ;
[ def>> fourth ] [ stack-effect in>> ] bi zip [ ] [
unclip-last
[ [ first2 "," append pprint-function-arg ] each ] dip
first2 pprint-function-arg
] if-empty ;
M: alien-function-word definer
drop \ FUNCTION: \ ; ;