class SyntaxTree::CallChainFormatter

This is probably the most complicated formatter in this file. It’s responsible for formatting chains of method calls, with or without arguments or blocks. In general, we want to go from something like

foo.bar.baz

to

foo
  .bar
  .baz

Of course there are a lot of caveats to that, including trailing operators when necessary, where comments are places, how blocks are aligned, etc.