summaryrefslogtreecommitdiff
path: root/Zend/zend_ast.h
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-06-13 09:33:19 -0700
committerXinchen Hui <laruence@gmail.com>2016-06-13 09:33:19 -0700
commitaeb3948f3ce360f8ff77ba84a9ddef5dda522c5d (patch)
tree68101d70eb18b2db11b4b23c390be27f1ecfcfaf /Zend/zend_ast.h
parentf2fd4691521713b35a37762d4d53f5b7b9a76e47 (diff)
downloadphp-git-aeb3948f3ce360f8ff77ba84a9ddef5dda522c5d.tar.gz
Cleanup
Diffstat (limited to 'Zend/zend_ast.h')
-rw-r--r--Zend/zend_ast.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h
index 886b106228..d5396e7041 100644
--- a/Zend/zend_ast.h
+++ b/Zend/zend_ast.h
@@ -266,5 +266,10 @@ static zend_always_inline zend_ast *zend_ast_create_assign_op(uint32_t opcode, z
static zend_always_inline zend_ast *zend_ast_create_cast(uint32_t type, zend_ast *op0) {
return zend_ast_create_ex(ZEND_AST_CAST, type, op0);
}
-
+static zend_always_inline void zend_ast_list_rtrim(zend_ast *ast) {
+ zend_ast_list *list = zend_ast_get_list(ast);
+ if (list->child[list->children - 1] == NULL) {
+ list->children--;
+ }
+}
#endif