this uses a new `queueSpace` function, which inserts a space before
writing the next token, unless we already had a newline inserted. This
also fixes cases with double spaces.
This queueSpace function makes it much more resilient to grammar changes
because we can put it in a lot more spaces without worrying about
potentially inserting two spaces. It also catches more cases with
keep_new_lines as every inserted space checks for if it should keep the
existing new line at the current token.