too many ellipses pasted by andyjpb on Thu Jun 27 01:35:08 2019
----- (define-syntax define-object (syntax-rules () ((define-objects NAME FIELDS ...) (begin (define NAME (make-gromit-object 'NAME (let-syntax ((field->list (syntax-rules () ((field->list (name type)) '(name type))))) (vector (field->list FIELDS) ...)))))) )) ----- works but, ----- (define-syntax define-object (syntax-rules () ((define-objects NAME FIELDS ...) (begin (define NAME (make-gromit-object 'NAME (let-syntax ((field->list (syntax-rules () ((field->list (name type flags ...)) '(name type flags ...))))) (vector (field->list FIELDS) ...)))))) )) ----- gives ----- Error: during expansion of (syntax-rules ...) - too many ellipses: (type ...) Call history: <syntax> (define-syntax define-object (syntax-rules () ((define-objects NAME FIELDS ...) (begin (define NAME ... <syntax> (##core#define-syntax define-object (syntax-rules () ((define-objects NAME FIELDS ...) (begin (defin...... <syntax> (syntax-rules () ((define-objects NAME FIELDS ...) (begin (define NAME (make-gromit-object (quote NA...... <-- -----
no title added by andyjpb on Thu Jun 27 01:39:32 2019
...but ----- (define-syntax field->list (syntax-rules () ((field->list (name type flags ...)) '(name type flags ...))) ) (define-syntax define-object (syntax-rules () ((define-objects NAME FIELDS ...) '(begin (define NAME (make-gromit-object 'NAME (vector (field->list FIELDS) ...))))) )) ----- works!?!