stage2 迁移ast解析器 stage1 防止错误死循环

This commit is contained in:
zzy committed 2026-09-18 22:32:57 +08:00
1 parent bb9d0a9f18
commit b5a7a811b3
7 files changed
+3000 -71

No files matched your search

+1
View File
@@ -849,6 +849,7 @@ static spl_ast_node_ref_t parse_container_declaration(spl_parser_t *p) {
}
default:
PARSE_ERROR(p, SPL_DIAG_KIND_PARSE_UNRECOGNIZED, t, "unrecognized declaration");
advance(p); /* 消费该 token,避免调用方在错误恢复时原地死循环 */
vec_free(tag_list);
return 0;
}