public function compileSource($source, $name = null)
    {
        try {
            return $this->compile($this->parse($this->tokenize($source, $name)));
        } catch (Twig_Error $e) {
            $e->setTemplateFile($name);
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Syntax(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $name, $e);
        }
    }
public function compileSource($source, $name = null)
    {
        try {
            return $this->compile($this->parse($this->tokenize($source, $name)));
        } catch (Twig_Error $e) {
            $e->setTemplateFile($name);
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Syntax(sprintf('An exception has been thrown during the compilation of a template ("%s").', $e->getMessage()), -1, $name, $e);
        }
    }
public function compileSource ( $ source , $ name = null ) { try { return $ this -> compile ( $ this -> parse ( $ this -> tokenize ( $ source , $ name ) ) ) ; } catch ( Twig_Error $ e ) { $ e -> setTemplateFile ( $ name ) ; throw $ e ; } catch ( Exception $ e ) { throw new Twig_Error_Syntax ( sprintf ( 'An exception has been thrown during the compilation of a template ("%s").' , $ e -> getMessage ( ) ) , - 1 , $ name , $ e ) ; } }
Compiles a template source code.

@param string $source The template source code
@param string $name   The template name

@return string The compiled PHP source code

@throws Twig_Error_Syntax When there was an error during tokenizing, parsing or compiling
Compiles a template source code .