Search in sources :

Example 1 with ClearSoyDocStringsVisitor

use of com.google.template.soy.passes.ClearSoyDocStringsVisitor in project closure-templates by google.

the class SoyFileSet method compileForServerRendering.

/**
 * Runs common compiler logic shared by tofu and jbcsrc backends.
 */
private ServerCompilationPrimitives compileForServerRendering() {
    ParseResult result = parse(SyntaxVersion.V2_0);
    throwIfErrorsPresent();
    SoyFileSetNode soyTree = result.fileSet();
    TemplateRegistry registry = result.registry();
    // which case it is pointless.
    if (cache == null) {
        new ClearSoyDocStringsVisitor().exec(soyTree);
    }
    throwIfErrorsPresent();
    return new ServerCompilationPrimitives(registry, soyTree);
}
Also used : TemplateRegistry(com.google.template.soy.soytree.TemplateRegistry) ClearSoyDocStringsVisitor(com.google.template.soy.passes.ClearSoyDocStringsVisitor) ParseResult(com.google.template.soy.SoyFileSetParser.ParseResult) SoyFileSetNode(com.google.template.soy.soytree.SoyFileSetNode)

Aggregations

ParseResult (com.google.template.soy.SoyFileSetParser.ParseResult)1 ClearSoyDocStringsVisitor (com.google.template.soy.passes.ClearSoyDocStringsVisitor)1 SoyFileSetNode (com.google.template.soy.soytree.SoyFileSetNode)1 TemplateRegistry (com.google.template.soy.soytree.TemplateRegistry)1