Implement eval macrocharacter (#'.)
[jscl.git] / src / read.lisp
index 1d057bd..87ceb1a 100644 (file)
@@ -16,6 +16,7 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with JSCL.  If not, see <http://www.gnu.org/licenses/>.
 
+(/debug "loading read.lisp!")
 
 ;;;; Reader
 
     (case ch
       (#\'
        (list 'function (ls-read stream eof-error-p eof-value t)))
+      (#\.
+       (eval (ls-read stream)))
       (#\(
        (do ((elements nil)
             (result nil)
        (let ((descriptor (subseq (read-until stream #'terminalp) 1))
              (subdescriptors nil))
          (do* ((start 0 (1+ end))
-               (end (position #\: (subseq descriptor start))
-                    (position #\: (subseq descriptor start))))
+               (end (position #\: descriptor :start start)
+                    (position #\: descriptor :start start)))
               ((null end)
                (push (subseq descriptor start) subdescriptors)
                `(oget *root* ,@(reverse subdescriptors)))