X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fread.lisp;h=6e9eb68cc751bcb7e6d6c411e08e43bbfcdc061b;hb=ce86ba5f70b9e35bfb795402913f417de493e23f;hp=ceec88397c02b07331ade18a338c3b0df5b1301d;hpb=d36f6144487e7a97cd9e3cfca86b66274f3c36d9;p=jscl.git diff --git a/src/read.lisp b/src/read.lisp index ceec883..6e9eb68 100644 --- a/src/read.lisp +++ b/src/read.lisp @@ -16,6 +16,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with JSCL. If not, see . +(/debug "loading read.lisp!") ;;;; Reader @@ -247,10 +248,18 @@ (ls-read stream eof-error-p eof-value t) (prog2 (ls-read stream) (ls-read stream eof-error-p eof-value t))))) - (#\J + ((#\J #\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 #\: descriptor :start start) + (position #\: descriptor :start 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))