- added a new lang.raw and _.raw token to Lang extexion

This commit is contained in:
mcndave committed 2022-07-18 17:44:03 +00:00
1 parent 531f786747
commit aa0bdea0c5
2 files changed
+8 -4

No files matched your search

+1 -3
View File
@@ -113,9 +113,7 @@ class Compiler
foreach($this->extensionList as $ext) {
if ($ext instanceof FunctionExtension) {
foreach ($ext->exportFunctions() as $name => $value) {
if ( is_string($value) ) {
$callable = fn(...$args) => call_user_func_array([ $ext, $value ], $args);
}
$callable = is_string($value) ? fn(...$args) => call_user_func_array([ $ext, $value ], $args) : null;
$context->pushFunction(is_numeric($name) ? $value : $name, $callable ?? $value);
}