all forms must work
This commit is contained in:
2
info.rkt
2
info.rkt
@@ -1,7 +1,7 @@
|
|||||||
#lang info
|
#lang info
|
||||||
|
|
||||||
(define pkg-authors '(hnmdijkema))
|
(define pkg-authors '(hnmdijkema))
|
||||||
(define version "0.3")
|
(define version "0.4")
|
||||||
(define license 'Apache-2.0)
|
(define license 'Apache-2.0)
|
||||||
(define collection "roos")
|
(define collection "roos")
|
||||||
(define pkg-desc "An OO Framework for Racket")
|
(define pkg-desc "An OO Framework for Racket")
|
||||||
|
|||||||
18
main.rkt
18
main.rkt
@@ -153,13 +153,27 @@
|
|||||||
'@is-a-roos-class
|
'@is-a-roos-class
|
||||||
(if (eq? (car arg) '@roos-classname@)
|
(if (eq? (car arg) '@roos-classname@)
|
||||||
(@roos-classname at ...)
|
(@roos-classname at ...)
|
||||||
(apply (@roos-caller at ...) arg))))))))
|
(apply (@roos-caller at ...) arg))))))
|
||||||
|
((_ (a . bb) (at ... . atb) self (supers ...) b ...)
|
||||||
|
(define (a . arg)
|
||||||
|
(roos1 (at ... . atb) self (supers ...) b ...)
|
||||||
|
(if (null? arg)
|
||||||
|
(a)
|
||||||
|
(if (eq? (car arg) '@roos-class?)
|
||||||
|
'@is-a-roos-class
|
||||||
|
(if (eq? (car arg) '@roos-classname@)
|
||||||
|
(@roos-classname at ... . atb)
|
||||||
|
(apply (@roos-caller at ... . atb) arg))))))
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
(define-syntax roos
|
(define-syntax roos
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((_ (a ...) self (supers ...) b ...)
|
((_ (a ...) self (supers ...) b ...)
|
||||||
(@roos-top (a ...) (a ...) self (supers ...) b ...))))
|
(@roos-top (a ...) (a ...) self (supers ...) b ...))
|
||||||
|
((_ (a ... . b) self (supers ...) c ...)
|
||||||
|
(@roos-top (a ... . b) (a ... . b) self (supers ...) c ...))
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
(define (roos-class? cl)
|
(define (roos-class? cl)
|
||||||
|
|||||||
Reference in New Issue
Block a user