Package com.google.javascript.jscomp
Class CodeGenerator
- java.lang.Object
-
- com.google.javascript.jscomp.CodeGenerator
-
public class CodeGenerator extends java.lang.ObjectCodeGenerator generates codes from a parse tree, sending it to the specified CodeConsumer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCodeGenerator.ContextInformation on the current context.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCodeGenerator(CodeConsumer consumer, CompilerOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadd(Node n)protected voidadd(Node node, CodeGenerator.Context context)protected voidadd(Node node, CodeGenerator.Context context, boolean printComments)Generate the current nodeprotected voidadd(java.lang.String str)protected voidprintLeadingCommentsInOrder(Node node)Print Leading JSDocComments or NonJSDocComments for the given node in order, depending on their source location.protected voidprintTrailingComment(Node node)voidtagAsStrict()Insert a ECMASCRIPT 5 strict annotation.
-
-
-
Constructor Detail
-
CodeGenerator
protected CodeGenerator(CodeConsumer consumer, CompilerOptions options)
-
-
Method Detail
-
tagAsStrict
public void tagAsStrict()
Insert a ECMASCRIPT 5 strict annotation.
-
printLeadingCommentsInOrder
protected void printLeadingCommentsInOrder(Node node)
Print Leading JSDocComments or NonJSDocComments for the given node in order, depending on their source location.
-
printTrailingComment
protected void printTrailingComment(Node node)
-
add
protected void add(java.lang.String str)
-
add
protected void add(Node n)
-
add
protected void add(Node node, CodeGenerator.Context context)
-
add
protected void add(Node node, CodeGenerator.Context context, boolean printComments)
Generate the current node
-
-