public final class SubstituteGlobalsVisitor extends Object
Important: Do not use outside of Soy code (treat as superpackage-private).
To do substitution only, set shouldAssertNoUnboundGlobals to false in the
constructor. To do substitution and checking, set shouldAssertNoUnboundGlobals to true.
| Constructor and Description |
|---|
SubstituteGlobalsVisitor(Map<String,PrimitiveData> compileTimeGlobals,
SoyTypeRegistry typeRegistry,
boolean shouldAssertNoUnboundGlobals,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
exec(SoyFileSetNode soyTree)
Runs this pass on the given Soy tree.
|
public SubstituteGlobalsVisitor(@Nullable Map<String,PrimitiveData> compileTimeGlobals, @Nullable SoyTypeRegistry typeRegistry, boolean shouldAssertNoUnboundGlobals, ErrorReporter errorReporter)
compileTimeGlobals - Map from compile-time global name to value.shouldAssertNoUnboundGlobals - Whether to throw an exception if we encounter an unbound
global.public void exec(SoyFileSetNode soyTree)