void accept(Environment env) throws TemplateException, IOException {
if (nestedBlock != null) {
env.visitAndTransform(nestedBlock, new CaptureOutput(env), null);
} else {
TemplateModel value = new SimpleScalar("");
if (namespaceExp != null) {
Environment.Namespace ns = (Environment.Namespace) namespaceExp.eval(env);
ns.put(varName, value);
} else if (scope == Assignment.NAMESPACE) {
env.setVariable(varName, value);