/** * Evaluates this node * * @param com.github.mustache.Context $context the rendering context * @return string */ public function evaluate($context) { $value = $context->lookup($this->name); if ($context->isCallable($value)) { $rendered = $context->asRendering($value, $this, $this->options); } else { $rendered = $context->asString($value); } return $this->escape ? htmlspecialchars($rendered) : $rendered; }