summaryrefslogtreecommitdiff
path: root/modules/ssh/dist
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-10-29 21:07:10 +0300
committerArtyom V. Poptsov <poptsov.artyom@gmail.com>2015-10-29 21:07:10 +0300
commit00c385d6eaa43d46cd36ba2c65e50f90c62baa60 (patch)
tree9e519442210a3e3814bd0ba7f1f282b38d8c8706 /modules/ssh/dist
parentnode.scm (read-string): New procedure (diff)
downloadguile-ssh-00c385d6eaa43d46cd36ba2c65e50f90c62baa60.tar.gz
node.scm (rrepl-get-result): Remove extra 'let'
* modules/ssh/dist/node.scm (rrepl-get-result): Remove extra 'let'.
Diffstat (limited to 'modules/ssh/dist')
-rw-r--r--modules/ssh/dist/node.scm58
1 files changed, 29 insertions, 29 deletions
diff --git a/modules/ssh/dist/node.scm b/modules/ssh/dist/node.scm
index 507f577..4fe4bd0 100644
--- a/modules/ssh/dist/node.scm
+++ b/modules/ssh/dist/node.scm
@@ -189,35 +189,35 @@ name. Throw 'node-repl-error' on an error."
(string-append result "\n" line)))))
(define (read-result match)
- (let ((matches
- (let loop ((line (read-line repl-channel))
- (matches (list match)))
- (if (or (eof-or-null? line)
- (regexp-exec %repl-undefined-result-regexp line))
- (reverse matches)
- (loop (read-line repl-channel)
- (cons (regexp-exec %repl-result-2-regexp line) matches))))))
- (let ((len (length matches)))
- (if (= len 1)
- (let ((m (car matches)))
- (values (read-string (match:substring m 4))
- (string->number (match:substring m 3))))
- (let ((rv (make-vector len))
- (nv (make-vector len)))
- (vector-set! rv 0
- (read-string (match:substring (car matches) 4)))
- (vector-set! nv 0
- (string->number (match:substring (car matches) 3)))
- (do ((i 1 (1+ i)))
- ((= i len))
- (vector-set! rv i
- (read-string (match:substring (list-ref matches i)
- 2)))
- (vector-set! nv i
- (string->number (match:substring (list-ref matches
- i)
- 1))))
- (values rv nv))))))
+ (let* ((matches
+ (let loop ((line (read-line repl-channel))
+ (matches (list match)))
+ (if (or (eof-or-null? line)
+ (regexp-exec %repl-undefined-result-regexp line))
+ (reverse matches)
+ (loop (read-line repl-channel)
+ (cons (regexp-exec %repl-result-2-regexp line) matches)))))
+ (len (length matches)))
+ (if (= len 1)
+ (let ((m (car matches)))
+ (values (read-string (match:substring m 4))
+ (string->number (match:substring m 3))))
+ (let ((rv (make-vector len))
+ (nv (make-vector len)))
+ (vector-set! rv 0
+ (read-string (match:substring (car matches) 4)))
+ (vector-set! nv 0
+ (string->number (match:substring (car matches) 3)))
+ (do ((i 1 (1+ i)))
+ ((= i len))
+ (vector-set! rv i
+ (read-string (match:substring (list-ref matches i)
+ 2)))
+ (vector-set! nv i
+ (string->number (match:substring (list-ref matches
+ i)
+ 1))))
+ (values rv nv)))))
(let ((result (read-line repl-channel)))
(if (string-null? result)