Christophe
Weblog
Wiki
Code
Publications
Music
projects
/
swankr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0e61c8
)
support translation of t and nil
author
Christophe Rhodes
<csr21@cantab.net>
Wed, 6 Apr 2011 07:57:45 +0000
(08:57 +0100)
committer
Christophe Rhodes
<csr21@cantab.net>
Wed, 6 Apr 2011 07:57:45 +0000
(08:57 +0100)
Parse them into TRUE and FALSE in the lisp->R translator
swank.R
patch
|
blob
|
history
diff --git
a/swank.R
b/swank.R
index 00967c558d916290739138a0c4177267fe697e57..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() {