diff --git a/App/lib/core/Gen/ExprGenCls.vp b/App/lib/core/Gen/ExprGenCls.vp index b137358..da8c255 100644 --- a/App/lib/core/Gen/ExprGenCls.vp +++ b/App/lib/core/Gen/ExprGenCls.vp @@ -31,6 +31,16 @@ import lib.core.Gen.ExprGenBase as ExprGenBase import lib.core.StubMergerStore as StubMergerStore import lib.core.Handles.ExprCallBase as ExprCallBase +# ============================================================ +# docstring 登记表容量常量(与 ExprGenMixin 保持一致,本地副本避免 +# 跨模块 CDefine 查找 bug:ExprGenCls(C) 在 ExprGenMixin(M) 之前按 +# 文件序编译时,跨模块 CDefine 全局表未注册 → NameError 未定义) +# ============================================================ +DOC_MAX: t.CDefine = 512 +DOC_KEY_SZ: t.CDefine = 192 +DOC_VAL_SZ: t.CDefine = 4096 + + # ============================================================ # ExprGenCls - ExprGenMixin 拆分(阶段 D):类名推断/docstring 登记 # diff --git a/App/lib/core/Gen/ExprGenFstr.vp b/App/lib/core/Gen/ExprGenFstr.vp index 7da0874..8ad9520 100644 --- a/App/lib/core/Gen/ExprGenFstr.vp +++ b/App/lib/core/Gen/ExprGenFstr.vp @@ -29,6 +29,15 @@ import lib.Projectrans.Utils as Utils import lib.core.Gen.ExprGenBase as ExprGenBase +# ============================================================ +# f-string 翻译常量(与 ExprGenMixin 保持一致,本地副本避免跨模块 +# CDefine 查找 bug:ExprGenFstr(F) 在 ExprGenMixin(M) 之前按文件序 +# 编译时,跨模块 CDefine 全局表未注册 → NameError 未定义) +# ============================================================ +FSTR_BUF_SIZE: t.CDefine = 1024 +FSTR_SPEC_MAX: t.CDefine = 64 +FSTR_FMT_MAX: t.CDefine = 64 + # ============================================================ # ExprGenFstr - ExprGenMixin 拆分(阶段 D):f-string/格式化值翻译 #