support cpp define
This commit is contained in:
@@ -7,15 +7,17 @@
|
||||
|
||||
(chicken-load "list.seh")
|
||||
|
||||
(define (imports-test a b c)
|
||||
(chicken-define (imports-test a b c)
|
||||
(fold + 0 (list 1 2 3 a b c)))
|
||||
|
||||
(struct foo
|
||||
((float a)
|
||||
((float a-field)
|
||||
(int b)
|
||||
((const char *) c)
|
||||
((fn bool ((bool val))) not)))
|
||||
|
||||
(var foo f #((= .a-field 1.2)))
|
||||
|
||||
,(list-T '(int))
|
||||
,(make-list-T '(int) #f)
|
||||
,(add-value-list-T '(int) #f)
|
||||
|
||||
3
sexc.scm
3
sexc.scm
@@ -32,6 +32,7 @@
|
||||
((prototype) '%prototype)
|
||||
((var) '%var)
|
||||
((begin) '%begin)
|
||||
((define) '%define)
|
||||
((pointer) '%pointer)
|
||||
((array) '%array)
|
||||
((@) 'vector-ref)
|
||||
@@ -140,7 +141,7 @@
|
||||
|
||||
(define (process-form form acc)
|
||||
(case (car form)
|
||||
((chicken-define) (eval form) acc)
|
||||
((chicken-define) (eval (cons 'define (cdr form))) acc)
|
||||
((template) (eval form) acc)
|
||||
((chicken-load)
|
||||
(load (cadr form)) acc)
|
||||
|
||||
Reference in New Issue
Block a user