public final class PySrcMain extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
| Constructor and Description |
|---|
PySrcMain(GuiceSimpleScope apiCallScope,
SimplifyVisitor simplifyVisitor,
com.google.inject.Provider<com.google.template.soy.pysrc.internal.GenPyCodeVisitor> genPyCodeVisitorProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
genPyFiles(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyPySrcOptions pySrcOptions,
String outputPathFormat,
String inputPathsPrefix,
ErrorReporter errorReporter)
Generates Python source files given a Soy parse tree, an options object, and information on
where to put the output files.
|
List<String> |
genPySrc(SoyFileSetNode soyTree,
TemplateRegistry templateRegistry,
SoyPySrcOptions pySrcOptions,
com.google.common.collect.ImmutableMap<String,String> currentManifest,
ErrorReporter errorReporter)
Generates Python source code given a Soy parse tree and an options object.
|
@Inject public PySrcMain(GuiceSimpleScope apiCallScope, SimplifyVisitor simplifyVisitor, com.google.inject.Provider<com.google.template.soy.pysrc.internal.GenPyCodeVisitor> genPyCodeVisitorProvider)
apiCallScope - The scope object that manages the API call scope.simplifyVisitor - The instance of SimplifyVisitor to use.genPyCodeVisitorProvider - Provider for getting an instance of GenPyCodeVisitor.public List<String> genPySrc(SoyFileSetNode soyTree, TemplateRegistry templateRegistry, SoyPySrcOptions pySrcOptions, com.google.common.collect.ImmutableMap<String,String> currentManifest, ErrorReporter errorReporter) throws SoySyntaxException
soyTree - The Soy parse tree to generate Python source code for.pySrcOptions - The compilation options relevant to this backend.currentManifest - The namespace manifest for current sources.SoySyntaxException - If a syntax error is found.public void genPyFiles(SoyFileSetNode soyTree, TemplateRegistry templateRegistry, SoyPySrcOptions pySrcOptions, String outputPathFormat, String inputPathsPrefix, ErrorReporter errorReporter) throws SoySyntaxException, IOException
soyTree - The Soy parse tree to generate Python source code for.pySrcOptions - The compilation options relevant to this backend.outputPathFormat - The format string defining how to build the output file path
corresponding to an input file path.inputPathsPrefix - The input path prefix, or empty string if none.SoySyntaxException - If a syntax error is found.IOException - If there is an error in opening/writing an output Python file.