Relocated functions

This commit is contained in:
Justin Ethier 2017-11-27 17:13:49 -05:00
parent 044d135b84
commit 957672fe70
2 changed files with 12 additions and 13 deletions

View file

@ -13,9 +13,6 @@
(scheme cyclone util) (scheme cyclone util)
) )
(export (export
define-syntax?
let-syntax?
letrec-syntax?
macro:macro? macro:macro?
macro:expand macro:expand
macro:add! macro:add!
@ -51,15 +48,6 @@
(define (macro:get-defined-macros) *macro:defined-macros*) (define (macro:get-defined-macros) *macro:defined-macros*)
;; Macro section ;; Macro section
(define (define-syntax? exp)
(tagged-list? 'define-syntax exp))
(define (let-syntax? exp)
(tagged-list? 'let-syntax exp))
(define (letrec-syntax? exp)
(tagged-list? 'letrec-syntax exp))
(define (macro:macro? exp defined-macros) (assoc (car exp) defined-macros)) (define (macro:macro? exp defined-macros) (assoc (car exp) defined-macros))
(define (macro:expand exp macro mac-env rename-env) (define (macro:expand exp macro mac-env rename-env)

View file

@ -11,6 +11,9 @@
(scheme char)) (scheme char))
(export (export
;; Code analysis ;; Code analysis
define-syntax?
let-syntax?
letrec-syntax?
tagged-list? tagged-list?
if? if?
if-syntax? if-syntax?
@ -121,6 +124,14 @@
(= (length exp) 3) (= (length exp) 3)
(= (length exp) 4)))) (= (length exp) 4))))
(define (define-syntax? exp)
(tagged-list? 'define-syntax exp))
(define (let-syntax? exp)
(tagged-list? 'let-syntax exp))
(define (letrec-syntax? exp)
(tagged-list? 'letrec-syntax exp))
; begin? : exp -> boolean ; begin? : exp -> boolean
(define (begin? exp) (define (begin? exp)