mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix getModifier arguments in parsers
This commit is contained in:
parent
d977c86116
commit
bd69bbd86a
@ -624,7 +624,7 @@ class Template extends Render {
|
|||||||
if($tokens->isSpecialVal()) {
|
if($tokens->isSpecialVal()) {
|
||||||
$_exp[] = $tokens->getAndNext();
|
$_exp[] = $tokens->getAndNext();
|
||||||
} elseif($tokens->isNext("(") && !$tokens->getWhitespace()) {
|
} elseif($tokens->isNext("(") && !$tokens->getWhitespace()) {
|
||||||
$func = $this->_fenom->getModifier($tokens->current());
|
$func = $this->_fenom->getModifier($tokens->current(), $this);
|
||||||
if(!$func) {
|
if(!$func) {
|
||||||
throw new \Exception("Function ".$tokens->getAndNext()." not found");
|
throw new \Exception("Function ".$tokens->getAndNext()." not found");
|
||||||
}
|
}
|
||||||
@ -1066,7 +1066,7 @@ class Template extends Render {
|
|||||||
*/
|
*/
|
||||||
public function parseModifier(Tokenizer $tokens, $value) {
|
public function parseModifier(Tokenizer $tokens, $value) {
|
||||||
while($tokens->is("|")) {
|
while($tokens->is("|")) {
|
||||||
$mods = $this->_fenom->getModifier($tokens->getNext(Tokenizer::MACRO_STRING) );
|
$mods = $this->_fenom->getModifier($tokens->getNext(Tokenizer::MACRO_STRING), $this);
|
||||||
if(!$mods) {
|
if(!$mods) {
|
||||||
throw new \Exception("Modifier ".$tokens->current()." not found");
|
throw new \Exception("Modifier ".$tokens->current()." not found");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user