qitab / cl-protobufs

Common Lisp protocol buffer implementation.
MIT License
82 stars 17 forks source link

Seperate printing concerns in text-format #329

Closed copybara-service[bot] closed 3 years ago

copybara-service[bot] commented 3 years ago

Seperate printing concerns in text-format

In print-text-format there should be a seperation of concerns between the message printing function and the underlying field printing functions. To that end:

  1. In the recursion, we currently have the top level implementation function of print-text-format determine whether to print field_name { This is more complicated then it should be, this is a field so the field printer should be the one worrying about it.
  2. Also, we should only worry about increasing indentation on a recurse, not in the field printers.