function write(tree, options = undefined,
		outputName = '<TreeWriter-output>', sourceRoot = undefined) {
  let [result, sourceMap] = toSource(tree, options, outputName, sourceRoot);
  if (sourceMap)
    options.generatedSourceMap = sourceMap;
  return result;
}
Create a ParseTreeWriter configured with options, apply it to tree
@param {ParseTree} tree
@param {Object=} options:
    prettyPrint: {boolean}
    sourceMapGenerator: {SourceMapGenerator} see third-party/source-maps
@param {string} outputName output filename.
@param {string} sourceRoot the sourcemap sourceroot.
@return source code; optional side-effect options.generatedSourceMap set