From: Christophe Rhodes Date: Wed, 6 Apr 2011 07:57:45 +0000 (+0100) Subject: support translation of t and nil X-Git-Url: http://christophe.rhodes.io/gitweb/?p=swankr.git;a=commitdiff_plain;h=732c94730278306081266f7dee21f39cb5e44e12 support translation of t and nil Parse them into TRUE and FALSE in the lisp->R translator --- 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() {