Simplify printer whitespace and newline handling
Trying to handle all the whitespace and newline printing inside printToken got overly complicated, and resulted in a few bugs in the layout around comments and indentation that were hard to fix. Rewrite the whitespace and newline handling to be handled directly by the object printers, using requestSpace() to ensure whitespace is inserted and requestNewline() to ensure a newline is inserted. Also fixes unnecessarily left aligning all comments that contain indentation, and fixes accidentally unindenting comments that are the last token in their indented block. Change-Id: I18707802726107cf0b6ec7de9b542d0ec1d2c0dd
Loading
Please register or sign in to comment