Skip to content

Navigation Menu

Sign up
Constellation edited this page Jul 17, 2012 · 25 revisions

Generator

syntax

escodegen.generate(AST[, options]);

options

{
 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)

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /