public function Twig_Compiler::compile

Compiles a node.

Parameters

Twig_NodeInterface $node The node to compile:

integer $indentation The current indentation:

Return value

Twig_Compiler The current compiler instance

Overrides Twig_CompilerInterface::compile

File

drupal/core/vendor/twig/twig/lib/Twig/Compiler.php, line 68

Class

Twig_Compiler
Compiles a node to PHP code.

Code

public function compile(Twig_NodeInterface $node, $indentation = 0) {
  $this->lastLine = null;
  $this->source = '';
  $this->sourceOffset = 0;
  $this->sourceLine = 0;
  $this->indentation = $indentation;
  $node
    ->compile($this);
  return $this;
}