code: public void process(TemplateImpl template, Writer out) throws IOException {
      
      Environment env = new Environment(template.getPath(), out);
      currentScope.declaringEnvironment = env;
  
      Environment prevEnv = switchEnvironment(env);
      
      TemplateContext tmpl = template.getContext();
      HeaderContext hdr = tmpl.hdr;
      
      if (hdr != null &&
          hdr.hdrSig != null &&
          hdr.hdrSig.callSig != null &&
          hdr.hdrSig.callSig.paramDecls != null) {
        
        for (ParameterDeclContext paramDecl : hdr.hdrSig.callSig.paramDecls) {
          
          String paramId = paramDecl.id.getText();
          
          if (!currentScope.values.containsKey(paramId)) {
            
            currentScope.declare(paramId, eval(paramDecl.expr));
            
          }
          
        }
        
      }
      
  		try {
  			tmpl.accept(visitor);
  		}
  		finally {
  		  switchEnvironment(prevEnv);
  		}
    }
docs: Processes a template into its text representation