-
-
Save nikita2206/bf419c8c23479bbf826c31cffe16a749 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y | |
index 43cf22b..e6af8de 100644 | |
--- a/Zend/zend_language_parser.y | |
+++ b/Zend/zend_language_parser.y | |
@@ -253,6 +253,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*); | |
%type <ast> array_pair non_empty_array_pair_list array_pair_list possible_array_pair | |
%type <ast> isset_variable type return_type type_expr | |
%type <ast> identifier | |
+%type <ast> function_identifier | |
%type <num> returns_ref function is_reference is_variadic variable_modifiers | |
%type <num> method_modifiers non_empty_member_modifiers member_modifier | |
@@ -1264,6 +1265,13 @@ internal_functions_in_yacc: | |
{ $$ = zend_ast_create_ex(ZEND_AST_INCLUDE_OR_EVAL, ZEND_REQUIRE, $2); } | |
| T_REQUIRE_ONCE expr | |
{ $$ = zend_ast_create_ex(ZEND_AST_INCLUDE_OR_EVAL, ZEND_REQUIRE_ONCE, $2); } | |
+ | T_CALLABLE '(' function_identifier ')' { $$ = $3; } | |
+; | |
+ | |
+function_identifier: | |
+ dereferencable T_OBJECT_OPERATOR identifier { $$ = NULL; } | |
+ | class_name T_PAAMAYIM_NEKUDOTAYIM identifier { $$ = NULL; } | |
+ | name { $$ = NULL; } | |
; | |
isset_variables: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment