Package com.google.javascript.jscomp
Class CodeGenerator
- java.lang.Object
-
- com.google.javascript.jscomp.CodeGenerator
-
public class CodeGenerator extends java.lang.Object
CodeGenerator generates codes from a parse tree, sending it to the specified CodeConsumer.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CodeGenerator.Context
Information on the current context.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CodeGenerator(CodeConsumer consumer, CompilerOptions options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
add(Node n)
protected void
add(Node node, CodeGenerator.Context context)
protected void
add(Node node, CodeGenerator.Context context, boolean printComments)
Generate the current nodeprotected void
add(java.lang.String str)
protected void
printLeadingCommentsInOrder(Node node)
Print Leading JSDocComments or NonJSDocComments for the given node in order, depending on their source location.protected void
printTrailingComment(Node node)
void
tagAsStrict()
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
-
-