+(export 'charbuf-scanner-place-p)
+(defstruct charbuf-scanner-place
+ "A captured place we can return to later.
+
+ We remember the buffer-chain link, so that we can retrace our steps up to
+ the present. We also need the index at which we continue reading
+ characters; and the line and column numbers to resume from."
+ (scanner nil :type charbuf-scanner :read-only t)
+ (link nil :type charbuf-chain-link :read-only t)
+ (index 0 :type charbuf-index :read-only t)
+ (line 0 :type fixnum :read-only t)
+ (column 0 :type fixnum :read-only t))
+
+(defmethod file-location ((place charbuf-scanner-place))
+ (make-file-location (scanner-filename
+ (charbuf-scanner-place-scanner place))
+ (charbuf-scanner-place-line place)
+ (charbuf-scanner-place-column place)))
+