git.fiddlerwoaroof.com
Browse code

refactor: move insert, add print-object method

Edward authored on 25/02/2021 11:23:02
Showing 1 changed files
... ...
@@ -13,9 +13,12 @@
13 13
 
14 14
 
15 15
 
16
-(fw.lu:defclass+ insert ()
16
+(fw.lu:defclass+ insert (op)
17 17
   ((%point :initarg :point :accessor point)
18 18
    (%value :initarg :value :reader value)))
19
+(defmethod print-object ((o insert) s)
20
+  (print-unreadable-object (o s :type t :identity t)
21
+    (format s "~d/~d" (point o) (epoch o))))
19 22
 (defmethod transform-for-op ((op insert))
20 23
   (let ((point (point op))
21 24
         (insert-length (length (value op))))