mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Nested function calls
This commit is contained in:
parent
40bacf1dc5
commit
62830ff3bc
@ -733,7 +733,6 @@ class Template extends Render
|
||||
throw new \LogicException("Forbidden to call methods");
|
||||
}
|
||||
$code .= $this->parseArgs($tokens);
|
||||
// Kludge for nesting object calls
|
||||
while($tokens->is(T_OBJECT_OPERATOR))
|
||||
{
|
||||
$tokens->next();
|
||||
@ -742,11 +741,10 @@ class Template extends Render
|
||||
throw new \LogicException('Expected function name, but got "'.$tokens->current().'"');
|
||||
}
|
||||
$code .= '->' . $tokens->getAndNext();
|
||||
if(!$tokens->is("("))
|
||||
if($tokens->is("("))
|
||||
{
|
||||
throw new \LogicException('Expected token "(", but got "'.$tokens->current().'"');
|
||||
$code .= $this->parseArgs($tokens);
|
||||
}
|
||||
$code .= $this->parseArgs($tokens);
|
||||
}
|
||||
} elseif ($tokens->is(Tokenizer::MACRO_INCDEC)) {
|
||||
$code .= $tokens->getAndNext();
|
||||
|
Loading…
Reference in New Issue
Block a user