onToken callback and comments support

Added optional `onToken` callback and provided an example for preserving comments in the code generated with [Escodegen](https://github.com/Constellation/escodegen).