From bc017d0a612fac72a2a15c5c932cbb33b499bfa5 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Fri, 28 Aug 2026 12:25:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(tpc):=20=E8=A7=A3=E6=9E=90=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E8=AE=B0=E5=BD=95=E5=85=B7=E4=BD=93=20token=20?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=EF=BC=88=E6=B6=88=E9=99=A4'=E7=AC=AC=200=20?= =?UTF-8?q?=E8=A1=8C=200=20=E5=88=97'=E4=B8=8D=E5=8F=AF=E8=AF=BB=E9=94=99?= =?UTF-8?q?=E8=AF=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/ast/parser.vp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/ast/parser.vp b/includes/ast/parser.vp index 93bb137..50cd84c 100644 --- a/includes/ast/parser.vp +++ b/includes/ast/parser.vp @@ -1038,9 +1038,7 @@ def _parse_atom(ps: Parser | t.CPtr) -> AST | t.CPtr: if _match_op(ps, TokOp.LBrace): return _parse_brace(ps) - stdio.printf("[DBG-atom-fail] line=%d col=%d type=%d str='%s' op_id=%d\n", - _cur_lineno(ps), _cur_col(ps), _cur_type(ps), - _cur_str(ps) if _cur_str(ps) is not None else "(null)", _cur_op(ps)) + _record_parse_err(ps) ps.error_count += 1 return None @@ -1575,6 +1573,7 @@ def _parse_type_ann(ps: Parser | t.CPtr) -> AST | t.CPtr: before_ec: t.CInt = ps.error_count base: AST | t.CPtr = _parse_test(ps) if base is None: + _record_parse_err(ps) # 注解解析失败:记录具体位置(error_count 已在 _parse_test 内增加) return None ptr_level: t.CInt = 0 # 回收垃圾节点(_parse_test 对后缀 * / ** 的消费产物)