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 Summary
Constructors Constructor Description SExprPrinter(CssNode subtree)A S-Expr printer forCssNodeinstances.SExprPrinter(CssNode subtree, boolean includeHashCodes, boolean withLocationAnnotation)A S-Expr printer forCssNodeinstances.SExprPrinter(CssTree tree)A S-Expr printer forCssTreeinstances.SExprPrinter(CssTree tree, boolean includeHashCodes, boolean withLocationAnnotation)A S-Expr printer forCssTreeinstances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CssTreeVisitorcreateVisitor(VisitController visitController, CodeBuffer codeBuffer)Constructs the visitor required by the subclass.static java.lang.Stringprint(boolean includeHashCodes, boolean withLocationAnnotation, CssNode n)static java.lang.Stringprint(boolean includeHashCodes, boolean withLocationAnnotation, CssTree t)static java.lang.Stringprint(CssNode n)static java.lang.Stringprint(CssTree t)voidrunPass()-
Methods inherited from class com.google.common.css.compiler.passes.CodePrinter
getOutputBuffer, resetBuffer, setPreserveMarkedComments, visit
-
-
-
-
Constructor Detail
-
SExprPrinter
public SExprPrinter(CssNode subtree, boolean includeHashCodes, boolean withLocationAnnotation)
A S-Expr printer forCssNodeinstances.- 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 forCssTreeinstances.- Parameters:
includeHashCodes- boolean switch to include hash code for node or not.withLocationAnnotation- boolean switch to include source code location or not.
-
-
Method Detail
-
createVisitor
protected CssTreeVisitor createVisitor(VisitController visitController, CodeBuffer codeBuffer)
Description copied from class:CodePrinterConstructs the visitor required by the subclass. This visitor'senter*methods will be called after the source map generator'sstartSourceMappingmethod and before itsendSourceMappingmethod.- Specified by:
createVisitorin classCodePrinter
-
runPass
public void runPass()
-
print
public static java.lang.String print(CssTree t)
-
print
public static java.lang.String print(boolean includeHashCodes, boolean withLocationAnnotation, CssTree t)
-
print
public static java.lang.String print(CssNode n)
-
print
public static java.lang.String print(boolean includeHashCodes, boolean withLocationAnnotation, CssNode n)
-
-