From 7b766b2721e7e37107dddbb5b809f9453f2db7c0 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 5 Aug 2015 01:57:58 -0400 Subject: [PATCH] WIP --- TODO | 5 +++++ scheme/cyclone/transforms.scm | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 7d137073..d6e8f18d 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,11 @@ Roadmap: Working TODO list. should start creating issues for these to get them out of here: + - need to speed up the compilation cycle + switch to using shared libraries instead of static ones + move macro code to that module + if necessary, write makefile directive to automate rebuilding cyclone for macro development + - macros can start by adding define-syntax? section to transforms.scm. need to think about how macros from sld's will end up being diff --git a/scheme/cyclone/transforms.scm b/scheme/cyclone/transforms.scm index 0a3df925..2acb7730 100644 --- a/scheme/cyclone/transforms.scm +++ b/scheme/cyclone/transforms.scm @@ -913,7 +913,12 @@ ;; if found. would then want to continue expanding. may need to ;; return some value such as #t or nil as a placeholder, since the ;; define-syntax form would not be carried forward in the compiled code -;; ((define-syntax? exp) ...) + ((define-syntax? exp) + (let* ((name (cadr exp)) + (trans (caddr exp)) + (body (cadr trans))) + (set! *defined-macros* (cons (cons name body) *defined-macros*)) + #t)) ((macro? exp) (expand ;; Could expand into another macro (macro-expand exp)))