Splits the part of printing syntax_t out from function `writeObject'.
Refactor the writer module.