Partially refactor compiler.infix.

It did not become shorter, but at least it did become more readable.