Christophe Weblog Wiki Code Publications Music
support translation of t and nil
[swankr.git] / swank.R
diff --git a/swank.R b/swank.R
index 0de35f74997d9128489df019e7dec55251da00ce..7dd9d5c0a07676a70d433919acd376495b619ccc 100644 (file)
--- a/swank.R
+++ b/swank.R
@@ -210,7 +210,14 @@ readSexpFromString <- function(string) {
     } else if(grepl("^[0-9]+\\.[0-9]+$", token)) {
       as.double(token)
     } else {
-      as.name(token)
+      name <- as.name(token)
+      if(name == quote(t)) {
+        TRUE
+      } else if(name == quote(nil)) {
+        FALSE
+      } else {
+        name
+      }
     }
   }
   readToken <- function() {
@@ -691,3 +698,7 @@ emacsInspect.numeric <- function(numeric) {
   times <- system.time(parse(filename))
   list(quote(`:compilation-result`), list(), TRUE, times[3], substitute(loadp), filename)
 }
+
+`swank:quit-lisp` <- function(slimeConnection, sldbState) {
+  quit()
+}