summaryrefslogtreecommitdiff
path: root/Zend/zend_language_parser.y
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2011-08-16 10:44:47 +0000
committerHannes Magnusson <bjori@php.net>2011-08-16 10:44:47 +0000
commit550980cfe58f6c2c935079f10eaabc5c6c271cea (patch)
treef4b7b1683b33c9102ddad9853119bfa3b788106a /Zend/zend_language_parser.y
parent4a51ea4b81f2e3bc812ebd2b7ef9e6b4b295f1bf (diff)
downloadphp-git-550980cfe58f6c2c935079f10eaabc5c6c271cea.tar.gz
Callable typehint following the rules of is_callable($arg, false);
Diffstat (limited to 'Zend/zend_language_parser.y')
-rw-r--r--Zend/zend_language_parser.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_language_parser.y b/Zend/zend_language_parser.y
index ef390ffd56..0a52fe4a25 100644
--- a/Zend/zend_language_parser.y
+++ b/Zend/zend_language_parser.y
@@ -186,6 +186,7 @@ static YYSIZE_T zend_yytnamerr(char*, const char*);
%token T_DOUBLE_ARROW "=> (T_DOUBLE_ARROW)"
%token T_LIST "list (T_LIST)"
%token T_ARRAY "array (T_ARRAY)"
+%token T_CALLABLE "callable (T_CALLABLE)"
%token T_CLASS_C "__CLASS__ (T_CLASS_C)"
%token T_TRAIT_C "__TRAIT__ (T_TRAIT_C)"
%token T_METHOD_C "__METHOD__ (T_METHOD_C)"
@@ -523,7 +524,8 @@ non_empty_parameter_list:
optional_class_type:
/* empty */ { $$.op_type = IS_UNUSED; }
- | T_ARRAY { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_NULL; }
+ | T_ARRAY { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_ARRAY; }
+ | T_CALLABLE { $$.op_type = IS_CONST; Z_TYPE($$.u.constant)=IS_CALLABLE; }
| fully_qualified_class_name { $$ = $1; }
;