Class SExprPrinter

java.lang.Object
com.google.common.css.compiler.passes.CodePrinter
com.google.common.css.compiler.passes.SExprPrinter
All Implemented Interfaces:
CssCompilerPass

public class SExprPrinter extends CodePrinter
Build up an s-expression corresponding to the AST for debugging purposes.
  • Constructor Details

    • SExprPrinter

      public SExprPrinter(CssNode subtree)
      A S-Expr printer for CssNode instances.
    • SExprPrinter

      public SExprPrinter(CssTree tree)
      A S-Expr printer for CssTree instances.
    • SExprPrinter

      public SExprPrinter(CssNode subtree, boolean includeHashCodes, boolean withLocationAnnotation)
      A S-Expr printer for CssNode instances.
      Parameters:
      includeHashCodes - boolean switch to include hash code for node or not.
      withLocationAnnotation - boolean switch to include source code location or not.
    • SExprPrinter

      public SExprPrinter(CssTree tree, boolean includeHashCodes, boolean withLocationAnnotation)
      A S-Expr printer for CssTree instances.
      Parameters:
      includeHashCodes - boolean switch to include hash code for node or not.
      withLocationAnnotation - boolean switch to include source code location or not.
  • Method Details

    • createVisitor

      protected CssTreeVisitor createVisitor(VisitController visitController, CodeBuffer codeBuffer)
      Description copied from class: CodePrinter
      Constructs the visitor required by the subclass. This visitor's enter* methods will be called after the source map generator's startSourceMapping method and before its endSourceMapping method.
      Specified by:
      createVisitor in class CodePrinter
    • runPass

      public void runPass()
    • print

      public static String print(CssTree t)
    • print

      public static String print(boolean includeHashCodes, boolean withLocationAnnotation, CssTree t)
    • print

      public static String print(CssNode n)
    • print

      public static String print(boolean includeHashCodes, boolean withLocationAnnotation, CssNode n)