From 7d2b066997fe16aa9b87ccf08d3678dc55f023e9 Mon Sep 17 00:00:00 2001 From: David Vazquez Date: Thu, 20 Dec 2012 17:54:41 +0000 Subject: [PATCH] defparameter => defvar --- lispstrack.lisp | 4 ++-- test.lisp | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lispstrack.lisp b/lispstrack.lisp index 38b6f96..0019b5c 100644 --- a/lispstrack.lisp +++ b/lispstrack.lisp @@ -194,8 +194,8 @@ (defvar *compilation-unit-checks* '()) -(defparameter *env* '()) -(defparameter *fenv* '()) +(defvar *env* '()) +(defvar *fenv* '()) (defun make-binding (name type js declared) (list name type js declared)) diff --git a/test.lisp b/test.lisp index 950841d..6df4040 100644 --- a/test.lisp +++ b/test.lisp @@ -43,10 +43,17 @@ (defun car (x) (car x)) (defun caar (x) (car (car x))) (defun cadr (x) (car (cdr x))) +(defun caddr (x) (car (cdr x))) +(defun cadddr (x) (car (cdr x))) (defun cdr (x) (cdr x)) (defun cdar (x) (cdr (car x))) (defun cddr (x) (cdr (cdr x))) +(defun first (x) (car x)) +(defun second (x) (cadr x)) +(defun third (x) (caddr x)) +(defun fourth (x) (cadddr x)) + (defun list (&rest args) args) @@ -353,3 +360,25 @@ (if (every #'digit-char-p string) (parse-integer string) (intern (string-upcase string)))))))) + + +(defun ls-read-from-string (string) + (ls-read (make-string-stream string))) + + + +;;;; Compiler + +(defvar *compilation-unit-checks* '()) + +(defvar *env* '()) +(defvar *fenv* '()) + +(defun make-binding (name type js declared) + (list name type js declared)) + +(defun binding-name (b) (first b)) +(defun binding-type (b) (second b)) +(defun binding-translation (b) (third b)) +(defun binding-declared (b) + (and b (fourth b))) -- 1.7.10.4