There was an error while loading. Please reload this page.
1 parent c84843b commit c927500Copy full SHA for c927500
3/zend_class.md
@@ -416,7 +416,7 @@ void zend_compile_class_const_decl(zend_ast *ast)
416
zend_class_entry *ce = CG(active_class_entry);
417
uint32_t i;
418
419
- for (i = 0; i < list->children; ++i) { //不清楚这个地方为什么要用list,试了几个例子这个节点都只有一个child,即for只循环一次
+ for (i = 0; i < list->children; ++i) { //const声明了多个常量,遍历编译每个子节点
420
zend_ast *const_ast = list->child[i];
421
zend_ast *name_ast = const_ast->child[0]; //常量名节点
422
zend_ast *value_ast = const_ast->child[1];//常量值节点
0 commit comments