// resolves parent template
// set pointer to next value (contains the template file name)
$parent =
$this->finder->
find($options['template'
], false,
$source);
// set pointer to end of line - BLOCK_END_TYPE
do { $next =
$stream->
next();
} while (!
$next->
test(Token::BLOCK_END_TYPE
));
$tokens =
[ new Token(Token::BLOCK_START_TYPE, '', 2
),
new Token(Token::NAME_TYPE, 'extends', 2
),
new Token(Token::STRING_TYPE,
$parent, 2
),
new Token(Token::BLOCK_END_TYPE, '', 2
),
];
if ($this->
shouldEndFile($options['scopes'
],
$source)) { $tokens[] =
new Token(Token::EOF_TYPE, '',
$token->
getLine());
} $stream->
injectTokens($tokens);