Repository navigation
Constellation edited this page Jul 17, 2012
·
25 revisions
Generator
escodegen.generate(AST[, options]);
options:
for example,
{
format: {
indent: {
style: ' ',
base: 0
}
},
parse: null,
comment: false
}
-
option.format.indent.style: indent string (default is 4 space (' ')) -
option.format.indent.base: base indent level (default is 0) -
option.parse: Mozilla Parser API compatible parse function. If it is provided, generator try to use 'raw' representation. See esprima raw information -
option.comment: If comments are attached to AST, escodegen emit comments to output code (default is false)