added function-definition-form (it's a bit kludgy in that it most probably needs a generic solution)
Mon Jul 13 08:46:54 PDT 2009 attila.lendvai@gmail.com
* added function-definition-form (it's a bit kludgy in that it most probably needs a generic solution)
Warning: CRC errors found. These are probably harmless but should be repaired.
See 'darcs gzcrcs --help' for more information.
diff -rN -u old-cl-walker/src/functions.lisp new-cl-walker/src/functions.lisp
--- old-cl-walker/src/functions.lisp 2014-04-23 14:39:52.000000000 -0700
+++ new-cl-walker/src/functions.lisp 2014-04-23 14:39:52.000000000 -0700
@@ -85,6 +85,20 @@
,@(unwalk-declarations declares)
,@(unwalk-forms body))))
+(defclass function-definition-form (lambda-function-form)
+ ((name :accessor name-of :initarg :name)))
+
+(defwalker-handler defun (form parent env)
+ (with-form-object (node 'function-definition-form parent
+ :name (second form))
+ (walk-lambda-like node (third form)
+ (nthcdr 3 form) env)))
+
+(defunwalker-handler function-definition-form (form name arguments body declares)
+ `(defun ,name ,(unwalk-lambda-list arguments)
+ ,@(unwalk-declarations declares)
+ ,@(unwalk-forms body)))
+
(defclass named-lambda-function-form (lambda-function-form)
((special-form :accessor special-form-of :initarg :special-form)
(name :accessor name-of :initarg :name)))
diff -rN -u old-cl-walker/src/package.lisp new-cl-walker/src/package.lisp
--- old-cl-walker/src/package.lisp 2014-04-23 14:39:52.000000000 -0700
+++ new-cl-walker/src/package.lisp 2014-04-23 14:39:52.000000000 -0700
@@ -122,6 +122,7 @@
#:lambda-application-form
#:function-object-form
+ #:function-definition-form
#:lexical-function-object-form
#:walked-lexical-function-object-form
#:unwalked-lexical-function-object-form