Class CodeGenerator

java.lang.Object
com.google.javascript.jscomp.CodeGenerator

public class CodeGenerator extends Object
CodeGenerator generates codes from a parse tree, sending it to the specified CodeConsumer.
  • Constructor Details

  • Method Details

    • 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(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