Class TemplateCompactPrinter<T>

Type Parameters:
T - type of chunk id objects
All Implemented Interfaces:
CssCompilerPass

public class TemplateCompactPrinter<T> extends CompactPrinter
Printer for templates, which outputs GSS with holes to be filled for references. In addition, the declaration boundaries are explicitly noted, so that a declaration can be removed if it ends up empty.
  • Field Details

  • Constructor Details

    • TemplateCompactPrinter

      public TemplateCompactPrinter(CssTree tree, T chunk)
      Create a template printer for a given chunk.
      Parameters:
      tree - CSS AST to be printed (with regard to a selected chunk)
      chunk - the chunk selected for printing
  • Method Details

    • createVisitor

      protected CssTreeVisitor createVisitor(VisitController visitController, CodeBuffer buffer)
      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.
      Overrides:
      createVisitor in class CompactPrinter