Check for custom functions first.
This commit is contained in:
parent
e80cd74c3e
commit
914c400a7d
@ -3376,8 +3376,13 @@ class Parser
|
|||||||
$token = $this->lexer->lookahead;
|
$token = $this->lexer->lookahead;
|
||||||
$funcName = strtolower($token['value']);
|
$funcName = strtolower($token['value']);
|
||||||
|
|
||||||
// Check for built-in functions first!
|
$customFunctionDeclaration = $this->CustomFunctionDeclaration();
|
||||||
|
|
||||||
|
// Check for custom functions functions first!
|
||||||
switch (true) {
|
switch (true) {
|
||||||
|
case $customFunctionDeclaration !== null:
|
||||||
|
return $customFunctionDeclaration;
|
||||||
|
|
||||||
case (isset(self::$_STRING_FUNCTIONS[$funcName])):
|
case (isset(self::$_STRING_FUNCTIONS[$funcName])):
|
||||||
return $this->FunctionsReturningStrings();
|
return $this->FunctionsReturningStrings();
|
||||||
|
|
||||||
@ -3388,7 +3393,7 @@ class Parser
|
|||||||
return $this->FunctionsReturningDatetime();
|
return $this->FunctionsReturningDatetime();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return $this->CustomFunctionDeclaration();
|
$this->syntaxError('known function', $token);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3416,7 +3421,7 @@ class Parser
|
|||||||
return $this->CustomFunctionsReturningDatetime();
|
return $this->CustomFunctionsReturningDatetime();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$this->syntaxError('known function', $token);
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user