Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
pangudashu committed Aug 4, 2017
1 parent c84843b commit c927500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 3/zend_class.md
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ void zend_compile_class_const_decl(zend_ast *ast)
zend_class_entry *ce = CG(active_class_entry);
uint32_t i;

for (i = 0; i < list->children; ++i) { //不清楚这个地方为什么要用list,试了几个例子这个节点都只有一个child,即for只循环一次
for (i = 0; i < list->children; ++i) { //const声明了多个常量,遍历编译每个子节点
zend_ast *const_ast = list->child[i];
zend_ast *name_ast = const_ast->child[0]; //常量名节点
zend_ast *value_ast = const_ast->child[1];//常量值节点
Expand Down

0 comments on commit c927500

Please sign in to comment.