6 DMLC_REGISTRY_FILE_TAG(count_descendant);
8 static int count(ASTNode* node) {
10 for (ASTNode* child : node->children) {
11 accum += count(child) + 1;
13 node->num_descendant = accum;
17 void ASTBuilder::CountDescendant() {
18 count(this->main_node);