From 732c94730278306081266f7dee21f39cb5e44e12 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 6 Apr 2011 08:57:45 +0100 Subject: [PATCH] support translation of t and nil Parse them into TRUE and FALSE in the lisp->R translator --- swank.R | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/swank.R b/swank.R index 00967c5..7dd9d5c 100644 --- 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() { -- 2.30.2