This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Upgrading kawa from 1.8 to latest SVN


Per Bothner wrote:

Let me know if you have difficulties, or if the define-syntax-case macro is useful. I do want to mke macros easy to use.

There is some problem when I try to use macros for defining classes. For example, the following macro should define class with one attribute:


(define-syntax aa
  (lambda (x)
    (syntax-case x ()
      ((_ cl arg)
       #`(define-simple-class cl ()
           (arg type: <String> access: 'public))))))

However, when I invoke it, I get error message:

#|kawa:7|# (aa MyClass my-param)
<stdin>:7:1: invalid argument list for slot 'my-param' args:kawa.lang.SyntaxForm


According to code, this error means that parameter list could not be correctly parsed (e.g. each keyword was not followed by value).

What am I doing wrong?

--
Margus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]