order of macro expansion
Max Kirillov
max@max630.net
Tue Feb 28 08:30:00 GMT 2012
Hello.
I would like to know if there is a way to manage (or at least predict)
macros expansion. For example, I have the following code:
---------------
; this expands to a sequence of "define-alias" calls
(imports
....
("android.graphics" (Bitmap Paint Canvas)))
; if I comment out this declaration, compilation fails complaining about
unknown
; the "imports" above will result the same, and it works for other
usages
(define-alias Bitmap <android.graphics.Bitmap>)
(define-simple-class TestActivity (Activity) class-name:
"net.max630.android.test.TestActivity"
....
(bitmap1 :: Bitmap)
(bitmap2 :: Bitmap)
)
---------------
Here, the aliased in macro classes are not visible in field
declarations. I suppose this happens because it compiles
"define-simple-class" before fully expanding "imports". I could also
remember several other cases where I had similar problems.
Thanks,
--
Max
More information about the Kawa
mailing list