src/parser/streams-impl.lisp: Use slot accessor rather than `with-slots'.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 7 Aug 2019 16:21:40 +0000 (17:21 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 7 Aug 2019 16:31:23 +0000 (17:31 +0100)
The code is a bit longer, but I think it's more comfortable to read.

src/parser/streams-impl.lisp

index f14bf31..b3bb424 100644 (file)
    present back to a user.  Secondly, a name can be attached to a stream
    which doesn't actually have a file backing it."
 
-  (with-slots (file) stream
-    (or file (call-next-method))))
+  (or (position-aware-stream-file stream)
+      (call-next-method)))
 
 (defmethod file-location ((stream position-aware-stream))
   (multiple-value-bind (line column) (stream-line-and-column stream)