Ajout de push-functions
This commit is contained in:
parent
3bb7a28fb6
commit
9624497290
|
@ -42,7 +42,7 @@
|
||||||
(reject (error "slice-up-lambda-list : ~w ne peut être ici." last-element))))
|
(reject (error "slice-up-lambda-list : ~w ne peut être ici." last-element))))
|
||||||
|
|
||||||
;; Exemples :
|
;; Exemples :
|
||||||
;; (slice-up-lambda-list '(a b &optional u &rest c &key ((:foo bar)) :quux (:baz 'glop) &aux x))
|
;; (slice-up-lambda-list '(a b &optional u &rest c &key ((:foo bar)) :quux (:baz 'glop) &aux (x 1) (y (+ x 2))))
|
||||||
;; (slice-up-lambda-list '(a b &rest))
|
;; (slice-up-lambda-list '(a b &rest))
|
||||||
;; (slice-up-lambda-list '(a b))
|
;; (slice-up-lambda-list '(a b))
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
(mini-meval-params (cdr params) global new-local-2 nil (cdr optional) rest key other aux))
|
(mini-meval-params (cdr params) global new-local-2 nil (cdr optional) rest key other aux))
|
||||||
(if rest
|
(if rest
|
||||||
(mini-meval-params params global (acons `(,(car rest) . variable) params local) nil nil nil key other aux)
|
(mini-meval-params params global (acons `(,(car rest) . variable) params local) nil nil nil key other aux)
|
||||||
;; TODO : finir d'implémenter &key &allow-other-keys &aux (et relire CLTL).
|
;; TODO : finir d'implémenter &key &allow-other-keys &aux &rest (et relire CLTL).
|
||||||
local))))
|
local))))
|
||||||
; (if key
|
; (if key
|
||||||
; (let* ((keyword (first (car key)))
|
; (let* ((keyword (first (car key)))
|
||||||
|
@ -239,6 +239,12 @@ Mini-meval sera appellé sur des morceaux spécifiques du fichier source. Il fau
|
||||||
(()
|
(()
|
||||||
nil)))
|
nil)))
|
||||||
|
|
||||||
|
(defun push-functions (etat-global functions)
|
||||||
|
(cons nil (mapcar-append (cdr etat-global) (lambda (x) `((,x . function) . ,(fdefinition x))) functions)))
|
||||||
|
|
||||||
|
(defmacro etat-global-fn (&rest functions)
|
||||||
|
`(push-functions '(nil) ',functions))
|
||||||
|
|
||||||
(load "test-unitaire")
|
(load "test-unitaire")
|
||||||
(erase-tests mini-meval)
|
(erase-tests mini-meval)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user