Skip to content

Commit 5b5b763

Browse files
committed
Define AST node for partial placeholder value, the questionmark.
1 parent 79ec47c commit 5b5b763

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Zend/zend_ast.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ enum _zend_ast_kind {
6767
ZEND_AST_MAGIC_CONST = 0 << ZEND_AST_NUM_CHILDREN_SHIFT,
6868
ZEND_AST_TYPE,
6969
ZEND_AST_CONSTANT_CLASS,
70+
ZEND_AST_PARTIAL_PLACEHOLDER,
7071

7172
/* 1 child node */
7273
ZEND_AST_VAR = 1 << ZEND_AST_NUM_CHILDREN_SHIFT,

Zend/zend_language_parser.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ non_empty_argument_list:
716716
argument:
717717
expr { $$ = $1; }
718718
| T_ELLIPSIS expr { $$ = zend_ast_create(ZEND_AST_UNPACK, $2); }
719+
| '?' { $$ = zend_ast_create(ZEND_AST_PARTIAL_PLACEHOLDER); }
719720
;
720721

721722
global_var_list:

0 commit comments

Comments
 (0)