projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bb4bb3
)
quote for integers, strings and lists. no symbols
author
Raimon Grau
<raimonster@gmail.com>
Thu, 13 Dec 2012 02:13:42 +0000
(
03:13
+0100)
committer
Raimon Grau
<raimonster@gmail.com>
Thu, 13 Dec 2012 02:13:42 +0000
(
03:13
+0100)
lispstrack.lisp
patch
|
blob
|
history
diff --git
a/lispstrack.lisp
b/lispstrack.lisp
index
99a7473
..
c352d71
100644
(file)
--- a/
lispstrack.lisp
+++ b/
lispstrack.lisp
@@
-50,6
+50,12
@@
body can access to the local environment through the variable env"
(define-compilation setq (var val)
(format nil "~a = ~a" (ls-lookup var env) (ls-compile val env)))
+(define-compilation quote (sexp)
+ (cond
+ ((integerp sexp) (format nil "~a" sexp))
+ ((stringp sexp) (format nil "\"~a\"" sexp))
+ ((listp sexp) (format nil "[~{~a~^, ~}]" sexp))))
+
(defparameter *env* '())
(defparameter *env-fun* '())