From: David Vázquez Date: Tue, 4 Jun 2013 19:46:18 +0000 (+0100) Subject: #J supports multiple descriptors X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7143bafa06d1de63cb839fbe95d39913e5ed3445;p=jscl.git #J supports multiple descriptors --- diff --git a/src/read.lisp b/src/read.lisp index ceec883..e8ca5eb 100644 --- a/src/read.lisp +++ b/src/read.lisp @@ -250,7 +250,15 @@ (#\J (unless (char= (%peek-char stream) #\:) (error "FFI descriptor must start with a semicolon.")) - `(oget *root* ,(subseq (read-until stream #'terminalp) 1))) + (let ((descriptor (subseq (read-until stream #'terminalp) 1)) + (subdescriptors nil)) + (do* ((start 0 (1+ end)) + (end (position #\: (subseq descriptor start)) + (position #\: (subseq descriptor start)))) + ((null end) + (push (subseq descriptor start) subdescriptors) + `(oget *root* ,@(reverse subdescriptors))) + (push (subseq descriptor start end) subdescriptors)))) (otherwise (cond ((and ch (digit-char-p ch))