]> asedeno.scripts.mit.edu Git - cl-protobufs.git/commitdiff
printer.lisp: ~*~* -> ~2*
authorAlejandro R Sedeño <asedeno@google.com>
Mon, 11 Feb 2013 23:31:34 +0000 (18:31 -0500)
committerAlejandro R Sedeño <asedeno@google.com>
Mon, 11 Feb 2013 23:31:34 +0000 (18:31 -0500)
printer.lisp

index be8f85d8cea641b40fa631ddc94a6cc5f2145975..003e4b070a40f238c11468c74561ad48327729e9 100644 (file)
                             &key (indentation 0) more)
   (declare (ignore more))
   (with-prefixed-accessors (name documentation index) (proto- val)
-    (format stream "~&~@[~VT~]~A = ~D;~:[~*~*~;~VT// ~A~]~%"
+    (format stream "~&~@[~VT~]~A = ~D;~:[~2*~;~VT// ~A~]~%"
             (and (not (zerop indentation)) indentation)
             (maybe-qualified-name val) index
             documentation *protobuf-enum-comment-column* documentation)))
                (if (typep msg 'protobuf-type-alias)
                  (format stream "~&~@[~VT~]~(~A~) ~(~A~) ~A = ~D~
                                  ~:[~*~; [default = ~S]~]~@[ [packed = true]~*~]~{ [~:/protobuf-option/]~};~
-                                 ~:[~*~*~;~VT// ~A~]~%"
+                                 ~:[~2*~;~VT// ~A~]~%"
                          (and (not (zerop indentation)) indentation)
                          required (proto-proto-type msg) name index
                          defaultp default packed options
                                   ;; Keyword class means a primitive type, print default with ~S
                                   "~&~@[~VT~]~(~A~) ~A ~A = ~D~
                                    ~:[~*~; [default = ~S]~]~@[ [packed = true]~*~]~{ [~:/protobuf-option/]~};~
-                                   ~:[~*~*~;~VT// ~A~]~%"
+                                   ~:[~2*~;~VT// ~A~]~%"
                                   ;; Non-keyword class means an enum type, print default with ~A"
                                   "~&~@[~VT~]~(~A~) ~A ~A = ~D~
                                    ~:[~*~; [default = ~A]~]~@[ [packed = true]~*~]~{ [~:/protobuf-option/]~};~
-                                   ~:[~*~*~;~VT// ~A~]~%")
+                                   ~:[~2*~;~VT// ~A~]~%")
                          (and (not (zerop indentation)) indentation)
                          required (maybe-qualified-name msg type) name index
                          defaultp default packed options
             (and (not (zerop indentation)) indentation) class)
     (let ((other (and name (not (string-equal name (class-name->proto class))) name)))
       (cond ((or other alias-for documentation source-location)
-             (format stream "~%~@[~VT~](~:[~*~*~;:name ~(~S~)~@[~%~VT~]~]~
-                                        ~:[~*~*~;:alias-for ~(~S~)~@[~%~VT~]~]~
+             (format stream "~%~@[~VT~](~:[~2*~;:name ~(~S~)~@[~%~VT~]~]~
+                                        ~:[~2*~;:alias-for ~(~S~)~@[~%~VT~]~]~
                                         ~:[~*~;:documentation ~S~@[~%~VT~]~]~
                                         ~:[~*~;:source-location ~/source-location/~])"
                      (+ indentation 4)
              (let ((other (and name (not (string-equal name (class-name->proto class))) name)))
                (format stream "~%~@[~VT~](:index ~D~@[~%~VT~]~
                                           :arity ~(~S~)~@[~%~VT~]~
-                                          ~:[~*~*~;:name ~(~S~)~@[~%~VT~]~]~
-                                          ~:[~*~*~;:alias-for ~(~S~)~@[~%~VT~]~]~
-                                          ~:[~*~*~;:conc-name ~(~S~)~@[~%~VT~]~]~
+                                          ~:[~2*~;:name ~(~S~)~@[~%~VT~]~]~
+                                          ~:[~2*~;:alias-for ~(~S~)~@[~%~VT~]~]~
+                                          ~:[~2*~;:conc-name ~(~S~)~@[~%~VT~]~]~
                                           ~:[~*~;:documentation ~S~@[~%~VT~]~]~
                                           ~:[~*~;:source-location ~/source-location/~])"
                        (+ indentation 4)
                (cond ((eq message-type :extends)
                       (format stream " ()"))
                      ((or other alias-for conc-name documentation source-location)
-                      (format stream "~%~@[~VT~](~:[~*~*~;:name ~(~S~)~@[~%~VT~]~]~
-                                                 ~:[~*~*~;:alias-for ~(~S~)~@[~%~VT~]~]~
-                                                 ~:[~*~*~;:conc-name ~(~S~)~@[~%~VT~]~]~
+                      (format stream "~%~@[~VT~](~:[~2*~;:name ~(~S~)~@[~%~VT~]~]~
+                                                 ~:[~2*~;:alias-for ~(~S~)~@[~%~VT~]~]~
+                                                 ~:[~2*~;:conc-name ~(~S~)~@[~%~VT~]~]~
                                                  ~:[~*~;:documentation ~S~@[~%~VT~]~]~
                                                  ~:[~*~;:source-location ~/source-location/~])"
                               (+ indentation 4)
                                 "~&~@[~VT~](~A :type ~(~S~)~:[~*~; :default ~S~]~
                                  ~@[ :reader ~(~S~)~]~@[ :writer ~(~S~)~]~@[ :packed ~(~S~)~]~
                                  ~@[ :options (~{~/protobuf-option/~^ ~})~])~
-                                 ~:[~*~*~;~VT; ~A~]"
+                                 ~:[~2*~;~VT; ~A~]"
                                 ;; Non-keyword class means an enum type, print default with ~(~S~)
                                 "~&~@[~VT~](~A :type ~(~S~)~:[~*~; :default ~(~S~)~]~
                                  ~@[ :reader ~(~S~)~]~@[ :writer ~(~S~)~]~@[ :packed ~(~S~)~]~
                                  ~@[ :options (~{~/protobuf-option/~^ ~})~])~
-                                 ~:[~*~*~;~VT; ~A~]")
+                                 ~:[~2*~;~VT; ~A~]")
                        (and (not (zerop indentation)) indentation)
                        slot-name type defaultp default reader writer packed options
                        ;; Don't write the comment if we'll insert a close paren after it