summaryrefslogtreecommitdiff
path: root/Zend/zend_ast.h
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-07-09 23:39:21 +0200
committerNikita Popov <nikic@php.net>2014-07-09 23:39:21 +0200
commitd14b763bb9d7ed380c49458f31e6537aff554398 (patch)
tree7618b95b5c98130657ed1b7aed582f4c1340fdef /Zend/zend_ast.h
parentfc541418f2f77a56409e5d02a86e42bfa8a4ee44 (diff)
downloadphp-git-d14b763bb9d7ed380c49458f31e6537aff554398.tar.gz
Make unticked_statement an ast node (usually NULL)
Diffstat (limited to 'Zend/zend_ast.h')
-rw-r--r--Zend/zend_ast.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend_ast.h b/Zend/zend_ast.h
index b3d6969867..12d51dc137 100644
--- a/Zend/zend_ast.h
+++ b/Zend/zend_ast.h
@@ -69,6 +69,8 @@ enum _zend_ast_kind {
ZEND_AST_ARRAY_ELEM,
ZEND_AST_ENCAPS_LIST,
+ ZEND_AST_STMT_LIST,
+
ZEND_AST_GLOBAL,
ZEND_AST_UNSET,
ZEND_AST_RETURN,
@@ -158,7 +160,7 @@ static inline zend_ast *zend_ast_create_assign_op(zend_uint opcode, zend_ast *op
#define AST_COMPILE_STMT(ast) do { \
zend_ast *_ast = (ast); \
zend_compile_stmt(_ast TSRMLS_CC); \
- zend_ast_destroy(_ast); \
+ if (_ast) zend_ast_destroy(_ast); \
} while (0)
#define AST_ZNODE(znode) zend_ast_create_znode((znode))
@@ -167,5 +169,6 @@ static inline zend_ast *zend_ast_create_assign_op(zend_uint opcode, zend_ast *op
#define AC(znode) AST_COMPILE(&znode, znode.u.ast)
#define AS(znode) AST_COMPILE_STMT(znode.u.ast)
#define AZ(znode) ((znode).u.ast = AST_ZNODE(&znode))
+#define AN(znode) ((znode).u.ast = NULL)
#endif