fix(gen): ExprGenCls/Fstr 补本地 DOC/FSTR 常量副本
ExprGenMixin 拆分后 DOC/FSTR 系列常量只定义在 ExprGenMixin.vp(M),而 ExprGenCls(C)/ExprGenFstr(F) 按文件序先于 M 编译,跨模块 CDefine 全局表未注册 → NameError 未定义名称。按 CallGen 既有本地副本惯例补定义,消除文件序依赖。
This commit is contained in:
1 parent
6d627d67cf
commit
46170c20ef
2 files changed
+19
No files matched your search
@@ -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 登记
|
||||
#
|
||||
|
||||
@@ -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/格式化值翻译
|
||||
#
|
||||
|
||||
Reference in new issue
Block a user