Package com.google.javascript.jscomp
Class CodeGenerator
java.lang.Object
com.google.javascript.jscomp.CodeGenerator
CodeGenerator generates codes from a parse tree, sending it to the specified CodeConsumer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumInformation on the current context. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCodeGenerator(CodeConsumer consumer, CompilerOptions options) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidadd(Node node, CodeGenerator.Context context) protected voidadd(Node node, CodeGenerator.Context context, boolean printComments) Generate the current nodeprotected voidprotected voidPrint Leading JSDocComments or NonJSDocComments for the given node in order, depending on their source location.protected voidprintTrailingComment(Node node) voidInsert a ECMASCRIPT 5 strict annotation.
-
Constructor Details
-
CodeGenerator
-
-
Method Details
-
tagAsStrict
public void tagAsStrict()Insert a ECMASCRIPT 5 strict annotation. -
printLeadingCommentsInOrder
Print Leading JSDocComments or NonJSDocComments for the given node in order, depending on their source location. -
printTrailingComment
-
add
-
add
-
add
-
add
Generate the current node
-