Commit Graph
61 Commits
Author SHA1 Message Date
TermiNexus 1aa1b1f2f0 feat(vipeye-internal): str/bytes 指针算术与写入解引用,并补齐 short/ushort/ulong/ulonglong 内建 typedef
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- 指针算术:str/bytes(char*,i8*)的 `p + n` / `p - n` / `n + p` 返回指针本身,
  不再报 reportOperatorIssue(与增强赋值 `dest += n` 的处理对齐)
- 写入解引用:`*p = v` 走 getTypeOfViperDeref 的解引用类型(str/bytes → char),
  赋值目标校验的 Viper 通路上次已就位,本次补回归用例
- 内建 typedef 补齐 short/ushort/ulong/ulonglong(t.CShort/t.CUnsignedShort/
  t.CUnsignedLong/t.CUnsignedLongLong),与已有 long/longlong 同处
- 回归用例:viperUnaryPointer.test.ts 新增「指针算术与下标」用例、解引用读写道,
  viperBuiltinsVpTypedef.test.ts 扩展开 g() 参数断言
- 版本号提升至 1.1.420 并更新 CHANGELOG
2026-09-22 21:23:21 +08:00
TermiNexus 00b781a5cc fix(vipeye-internal): str/bytes 支持一元 '*' 解引用,结果为 char
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
Viper 里 str 与 bytes 都是 C 的 char*(i8*),`*s` 应取首字符且类型为 char(i8);
此前被当成非指针类型处理,报「类型 "str" 不支持运算符 "*"」(reportOperatorIssue)。
在 getTypeOfViperDeref 中把 str/bytes 与已有的 CPtr[X] 分支并列处理。

回归用例:viperUnaryPointer.test.ts 新增 *fmt(str)与 *buf(bytes)→ char,
并断言不报运算符错误。版本号提升至 1.1.419 并更新 CHANGELOG。
2026-09-22 21:01:18 +08:00
TermiNexus 4bc462e0f3 feat(vipeye-internal): long/longlong 也作为内置 C 基本类型 typedef
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
对齐编译器 t.py 的 _CNAME_ALIAS(char/short/long/unsigned 等是语言内置名称,
无需 import):在 builtins.vpi 内置 long → t.CLong、longlong → t.CLongLong。
C 的 "long long" 含空格不能作标识符,故 Viper 写作 longlong;无符号形式仍可用
t.CUnsignedLongLong。

回归用例补充 g(e: long, h: longlong) -> long 的注解类型断言(CLong/CLongLong)。
版本号提升至 1.1.418 并更新 CHANGELOG。
2026-09-22 20:39:52 +08:00
TermiNexus f547737cf0 fix(vipeye-internal): C 整型 typedef 内建到 builtins.vpi,修复 uint32 报未定义
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
TransPyC 的 includes/builtins.vp 提供 sizet/size_t/uzt/int8..uint64 以及
intfast*/uintfast*/intleast*/uintleast* 等 typedef。LSP 侧原先只靠 program.ts
的 _mergeViperBuiltinsVpSymbols 定位并合并该文件,而查找依赖工作区根与打开的
文件集合,在 Trae 等环境下找不到时这些注解会集体报"未定义"(同一工程在不同
编辑器/不同打开顺序下表现不一致)。

现把等价声明内建进 typeshed-fallback/stdlib/builtins.vpi:任意 Viper 工程无需
配置 includes 即可解析;工程自带 builtins.vp 时仍以工程声明为准(合并逻辑覆盖
同名符号,行为不变)。

新增回归用例:无 includes/builtins.vp 的工程可解析 uint32/sizet/int8/uint64
并得到 CUInt32T/CSizeT/CInt8T/CUInt64T。版本号提升至 1.1.417 并更新 CHANGELOG。
2026-09-22 19:30:55 +08:00
TermiNexus de2d49cc4a feat(vscode-vipeye): 新增「清理并临时关停」命令并修复字符串内括号着色
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- 新增命令 viper.cleanupAndDeactivate(Viper: Cleanup and Deactivate):终结本窗口的
  语言服务进程、释放全部已注册资源(命令/视图/状态栏/文件监视/流程图面板),可选
  清除全局语义高亮磁盘缓存(~/.vipeye/cache/semantic-tokens)。多窗口下服务端进程
  会 chdir 占住扩展目录(Windows 无法删除),磁盘缓存又跨窗口共享,导致卸载删不
  干净、其它实例读到半删残留且重启扩展宿主无效
- 修复字符串/注释/f-string 插值内的 []{}() 被编辑器内置括号配对着色误染:viper
  grammar 贡献补 balancedBracketScopes 与 unbalancedBracketScopes
- 语义高亮缓存路径改由 common/pathUtils 统一提供,服务端与客户端共用一份定义
- 版本号提升至 1.1.416 并更新 CHANGELOG
2026-09-22 18:23:01 +08:00
TermiNexus 86fc6c541f feat(vipeye-internal): [SIZE]T 支持泛型实参位置与嵌套
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- 下标实参以 '[' 开头时按 token 前瞻判定是否为数组类型:匹配的 ']' 之后
  紧跟元素类型(标识符或嵌套 '[')则是数组,故 `list[[4]int]` 可用,
  而 `t.Callable[[int, str], None]`(带逗号)与 `t.Callable[[], None]` 不受影响
- `[SIZE]T` 的元素类型内允许再次出现 `[SIZE]T`,支持 `list[[2][3]int]`
- 测试:新增与显式写法 `list[t.CArray[int, 4]]` 的类型等价断言及 Callable 回归
2026-09-22 16:21:32 +08:00
TermiNexus a7844d359f chore: 版本号提升至 1.1.415 并更新 CHANGELOG
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- [SIZE]T 数组类型语法(等价 t.CArray[T, SIZE]、[]T 不定长)
- 修复字符串转义引号导致的作用域泄漏
- 修复 builtins.vp typedef 合并被首个绑定文件环境"污染"
2026-09-22 16:13:54 +08:00
TermiNexus 91f668a033 fix(vscode-vipeye): 字符串转义引号导致 TextMate 作用域泄漏
字符串规则没有转义子规则,`'\''` / `"\""` 会被提前闭合:后续关键字
(如 or/def/return/pass)被渲染成字符串颜色。

- 新增 string-escape(constant.character.escape.viper)并让 4 条字符串规则 include
- 单行字符串 end 由引号改为「引号或行尾」,即使写错也不会把作用域拖到下一行
2026-09-22 16:13:49 +08:00
TermiNexus d9559869e7 feat(vipeye-internal): 新增 [SIZE]T 数组类型语法(脱糖为 t.CArray[T, SIZE])
- `[SIZE]T` 等价 t.CArray[T, SIZE],`[]T` 等价 t.CArray[T](不定长)
- 支持整数字面量 / t.CDefine 常量长度、多维嵌套 [2][3]T、指针元素 [4]T*
- 支持变量、参数、返回值、类成员与 type X = 注解位置
- 解析层脱糖:AST 与手写 t.CArray[T, SIZE] 完全一致,元素类型/索引返回 T/
  数组名退化为指针/字符数组降级 str·bytes 等语义零分叉
- 下标实参按源码位置排序(AST 子节点不重叠不变量),getTypeArgs 内按语义
  顺序重排实参;合成 t/CArray 名为零长度,不产生多余语义高亮
- 不在下标实参内生效,避免把 t.Callable[[], T] 误判为数组语法
- 源文件未 import t 时静默退化为 Unknown(不报未定义 t/成员访问失败)
- hover 与诊断按源码原形显示(如 buf: [4]t.CInt)
2026-09-22 16:13:43 +08:00
TermiNexus a6299ab878 fix(vipeye-internal): builtins.vp typedef 合并改为按执行环境+文件目录缓存
合并缓存原本只用 typeshed builtins 存根的 uri 作键(全工程共用一个),
且在查找 builtins.vp 之前就标记为已合并:若第一个被绑定的文件所在环境
找不到 includes/builtins.vp(工程外散落文件、多根工作区另一根等),
后续所有文件都会永久失去 typedef,导致 uint32/int8/sizet 等集体报
"未定义"(同一工程在 VSCode 与 Trae 因打开顺序不同而表现不一致)。

- 缓存键改为(typeshed 存根 + 执行环境 root/extraPaths + 被分析文件目录)
- 新增 _isMergingViperBuiltinsVp 递归保护,替代原先"先标记"顺带承担的防重入
- 新增回归测试:先绑定其它环境文件后,本工程 typedef 仍可解析
2026-09-22 16:13:26 +08:00
TermiNexus f100f585d0 chore: 版本号提升至 1.1.414 并更新 CHANGELOG
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-09-21 23:13:45 +08:00
TermiNexus 525a654f5c feat(vipeye-internal): 支持 enum X: 枚举语法与 define 常量声明
- enum:`enum NAME:` 识别为 Viper 枚举(等价 class NAME(t.CEnum)),
  成员支持裸名与逗号分隔(enum X: a, b, c),并支持同行声明后换行 TAB 续写
- enum:取值按编译期规则推导(从 0 递增,中间显式赋值后从该值 +1 续推),
  hover 显示 (variable) IsAsync: ASTFlag = 0,成员可隐式转换为 int
- enum:成员推导值超出声明类型位宽时报错(如 i1 存不下 2)
- define:`define NAME: 类型 = 值` / `define NAME = 值` 解析为常量声明,
  `define f(...)` 宏函数行为不变
- 新增整数字面量位宽校验:字面量无法存入声明类型时提示扩容,
  define 与普通声明均生效(位宽表源自 wiki 02-type-system.md)
- 新增 viperEnumFlag.test.ts(5 项)与 viperDefineConst.test.ts(4 项)
2026-09-21 23:13:38 +08:00
TermiNexus 70a4405294 chore(viper): 选择列表首项去掉手动指定 exe 路径描述并修正过时注释
该入口已改为文件选择对话框,原描述与输入框取路径等注释不再贴切。
2026-09-20 18:56:16 +08:00
TermiNexus 95a0dbf0ad feat(viper): 选择列表加「选择编译器…」,关闭 VET 后清单与选中仍可用
- 选择列表首项为「选择编译器…」(文件选择对话框 → VET check → 并入清单并切换),其后一条分隔线才是 VET 搜到的环境
- 状态栏在 VET 关闭时显示 VET 已关闭,且点击仍打开选择列表(重启改走命令面板)
- EnvironmentManager 新增 AddEnvironment:check 通过的环境无需等下一轮快照即可选中
- 抽出 PickAndCheckExecutable,去掉 check 命令与该入口的重复实现
2026-09-20 18:54:09 +08:00
TermiNexus ad3fd9810c feat(viper): VET 启动参数加 --first-no-pace,首次扫描不节流
VET 常驻模式默认对扫盘节流(每 16 个目录项 / 64 个文件 Sleep 20ms),首次全盘搜索明显变慢,正是 Viper 搜索很慢的来源。带上该开关后首轮全速、后续轮次仍按 VET 自身节流跑。
2026-09-20 18:54:03 +08:00
TermiNexus 26216889de feat(viper): 新增手动指定 exe 的 VET check 检查
- 新增 viper.checkEnvironment(命令面板 + Environments 视图标题按钮):选择 exe 后经 check 通道校验 PE/.PRVERSN 与 --version 前缀
- 回执按回带的 id 配对;check_msg 九种原因(NOT_FOUND/NO_PRVERSN/TIMEOUT/CHANNEL_UNAVAILABLE 等)映射为可读说明
- stdin 写入改为入队后仅在心跳窗口内逐行送出(check 在前、心跳最后、行间 300ms、按窗口时长限量),规避看门狗对同批多行的读取行为
- 进程退出/停止时唤醒等待中的请求,避免调用方悬挂
2026-09-20 18:19:52 +08:00
TermiNexus 5d6fcf7c82 feat(viper): 接入 VET 环境发现,支持停止/查看输出与粘性选择
- 新增 EnvironmentTool / EnvironmentManager:常驻 scan 进程客户端(启动、心跳确认、快照解析、异常退出的指数退避重启)与全量快照 diff
- 侧边栏新增 Environments 视图(按 source 分组、选中项打勾);状态栏只保留 VET 环境项,移除硬编码 C:\v.exe
- 默认复用上次使用的环境 uuid,VET 未给出该 uuid 时取发现的第一个,一个都没发现时回退配置/兜底路径
- VET 的 stdout 与 stderr 全量转发到 Vipeye VET 输出通道,彻底移除日志文件落盘
- 新增 Stop VET / Restart VET / Show VET Output / Select Environment 命令,并补回被回写覆盖丢失的 contributes
2026-09-20 18:19:18 +08:00
TermiNexus b0f4b8b5fd chore(vipeye): 同步 package-lock 中的包版本号到 1.1.413 2026-09-19 17:59:23 +08:00
TermiNexus 640d7e4a07 feat(viper): 新增函数跳转图(Ctrl+Alt+G,面板渲染 Mermaid,可拖动缩放并导出 PNG)
- vipeye-internal/flowChartBuilder:AST -> 语句级控制流图(基本块合并)输出 Mermaid,
  覆盖 if/elif/else、for/for-else、while/while-else、match-case、try/except/else/finally、
  break/continue/return/raise、with;嵌套 def/class 折叠为单节点
- finally 穿透:return/raise/break/continue 与未匹配异常都先经过 finally 再继续,
  嵌套 finally 由 _routeThroughFinally 按最内层到最外层串联,并对边去重
- vipeye-internal/flowChartCommand:新增 viper.showFunctionFlowChart 命令,按 offset
  取最内层函数,返回 Mermaid 与「节点 -> 行号」映射
- vscode-vipeye:底部停靠面板 WebviewView 渲染 mermaid(外部脚本 media/flowChartWebview.js,
  数据经 postMessage 下发),支持拖拽平移(指针锁定无限拖 + 视口内保留可见图块)、
  滚轮缩放、适应宽度/重置、点击节点跳转源码行
- 导出 PNG:倍率/宽高/裁剪空白边距/透明或白色背景 + 实时预计尺寸,
  经 data: URL -> canvas 光栅化(导出前用 htmlLabels:false 重渲染,避开 foreignObject)
- 入口:快捷键 Ctrl+Alt+G、编辑器右键菜单、命令面板
- 依赖与构建:新增 mermaid 依赖,rspack 拷贝 mermaid 预构建产物与面板脚本到 dist/media
- 新增 9 个用例覆盖上述语句结构与 finally 穿透
- 同步 package-lock 中的版本号与 mermaid 依赖
2026-09-19 17:58:59 +08:00
TermiNexus cfccbac6f4 feat(vipeye-internal): 类型展示保留源码书写的完整 module 路径
- typePrinter 新增 ViperSourceQualifiedNames(1<<15),打印类名时优先取
  ClassDetailsPriv.displayName(源码里实际书写的 ast.AST 形式),未写限定路径的
  裸名(list/str)保持短名;UniqueNameMap 与打印共用 getPrintableClassName,
  避免名字唯一性判定与实际打印名不一致导致误降级
- types 新增 displayName 字段与 cloneForDisplayName(仅用于展示,不参与类型判定)
- typeEvaluator 在成员访问处记录点号路径(getDottedNamePath),仅 Viper 方言生效
- hoverProvider / tooltipUtils 透传 PrintTypeOptions.sourceQualifiedNames
- 修正 hover 与补全的代码围栏注释:```viper 实际可着色,但只有通用 scope 能命中
  主题规则(def/class 的 storage.type.*.viper 与按 Python 精调的主题规则不匹配),
  故继续使用 ```python
- 同步 viperUnaryPointer / viperFunctionHover 用例的展示断言
2026-09-19 17:58:49 +08:00
TermiNexus c9acd4ecb8 chore(vipeye-internal): 修剪 samples 残留与孤儿测试辅助
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- samples 根目录 1277 个散落 .py/.pyi 夹具删除,仅保留被现存用例引用的 15 个
  (badToken1/test_file1/lines1/parser1-2/suiteExpectedColon1-3/maxParseDepth1-2/
   parserRecovery1-3/fstring6/finallyExit1)+ 2 个 viper_*.vp;子目录夹具不动
- 删除已无引用的 harness/fourslash/runner.ts(fourslash 夹具与 testState.test 已删)
- 保留 tests/lsp/languageServerTestUtils.ts:仍被 typeServer.virtualFileRedirect 引用

验证: 全量串行 53 套件通过、1 跳过,732 用例全绿
2026-09-18 23:10:41 +08:00
TermiNexus 04d5a32502 test(vipeye-internal): 删除剩余 18 个内联 .py 夹具套件,测试集转为 Viper-only
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- 删除 completions/signatureHelp/diagnostics/service/languageServer/importResolver(+Support)/
  importStatementUtils/documentSymbolCollector/chainedSourceFiles/sourceMapperUtils/workspaceEditUtils/
  testState/classDeclaration/wildcardImportPackageMerge/privateImportUsage/typeServer 等 18 个套件
- 保留并加注 tests/fourslash/typings/fourslash.d.ts:其 declare namespace _ 仍被
  harness/fourslash/testState.ts 引用,删除会导致 ts-jest TS2694 整批套件无法运行

验证: 全量串行 53 套件通过、1 跳过,732 用例全绿(0 失败)
2026-09-18 23:05:17 +08:00
TermiNexus a955a5356f test(vipeye-internal): 清理 Python 时代测试资产并修复陈旧期望
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- 删除 fourslash 夹具(258 个 .py 用例)、fourSlashRunner、hoverProvider、typeEvaluator1-8、checker(共 276 个 pyright Python 语义用例文件)
- config/sourceFile: reportPrivateImportUsage 基本默认值期望改为 Viper 的 'none'
- config/uri/filesystem/diagnosticOverrides/localizer: 期望改为 .vp/.vpi 扩展、viper.analysis.* 命名空间与 locale 无关断言
- samples: project1/4、venv_auto_detect_*、extended_config 夹具 .py/.pyi 更名为 .vp/.vpi

验证: 相关 32 个套件 343 用例全绿
2026-09-18 22:50:03 +08:00
TermiNexus e4635eca37 fix(vipeye-internal): 恢复 py.typed 探测,修复 PartialStub 映射失效导致的 viperFileSystem 5 个失败
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- pyTypedUtils: 去掉按方言短路(IsViperDialect 恒为 true 使探测恒返回 undefined)
- partialStubService: 虚拟映射过滤器补回 .pyi(存根后缀支持 .vpi/.vpnci/.pyi)
- launch.json: 调试宿主同时禁用已安装的 TermiNexus.vipeye(真实扩展 ID)
2026-09-18 22:17:45 +08:00
TermiNexus d5398ab4e2 fix(vipeye-internal): 无类型参数的别名被下标特化时保留类型实参显示
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- typePrinter: rawptr[T] 不再退化为裸 rawptr,修复 Ty: rawptr[LLVMType] 成员访问丢参
- parser: 补充注解内 C 指针后缀 list[ast.AST*]* 的回归用例
- tests: viperTyNarrowDump 行号刷新/断言收窄到 rhs_val.Ty,修复 viperVariadicArgs 与 parser.test 既有失败
- vscode-vipeye: 调试模式下发布版自动让路给开发版,避免 command 'viper.*' already exists
- docs(changelog): 补充 rawptr[T] 类型实参显示修复条目
2026-09-18 21:59:57 +08:00
TermiNexus 86e858667e 修改了 README
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-09-18 21:49:07 +08:00
TermiNexus d9b5015c71 "feat(vipeye-internal): 新增内置 char 类型(复刻 int,8 位字符/整型)feat(vipeye-internal): rowptr 更名为 rawptr(编译器内置裸指针 typedef)feat(vipeye-internal): None 返回函数仅允许裸 return/return Nonefix(vipeye-internal): builtins.vp 发现扩展到文件祖先目录与 includes 子目录chore: 版本号提升至 1.1.413 并更新 CHANGELOG"
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-09-16 11:51:48 +08:00
TermiNexus aef18c2891 更新了一些事项,feat(vipeye-internal): builtins.vpi 声明编译器内置 typedef rowptr = t.CPtr;feat(vipeye-internal): None 返回函数仅允许裸 return/return None,return 值为 None 的表达式报错;fix(vipeye-internal): builtins.vp 发现扩展到文件祖先目录与 includes 子目录,修复 uint64 等 typedef 未定义
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-09-10 16:32:23 +08:00
TermiNexus 23cc75e444 feat(vipeye-internal): 新增内置 double 类型(复刻 float,64 位浮点)
- typeshed builtins.vpi 增加 double 类定义(复刻 float 结构)
- 内置 float<->double 按 C 浮点规则互转,int->double 无损
- 内置 double 与 t.CDouble 双向隐式转换
- viperGenericTypeVarCall 12/12 测试通过
2026-08-23 13:16:46 +08:00
TermiNexus ac08b01baa feat(vipeye-internal): extern/export 支持直接声明形式 extern A(...)
- extern/export 后跟标识符时按函数声明解析(等价 extern def A),
  def 形式保留(extern def A / export def A 均可用)
- extern/export 声明均可省略函数体(无冒号无 pass)
- checker 对 extern/export 声明跳过缺失返回值检查
- TextMate 高亮与缩进规则支持 extern/export 直接声明
- viperGenericTypeVarCall 11/11 测试通过
2026-08-17 10:35:46 +08:00
TermiNexus 41bc302916 feat(vipeye-internal): Viper len 优先调用 __len__,结构体缺 __len__ 报错
- len 对用户自定义结构体优先解析 __len__ 返回类型,无 __len__ 报错
- t.CType 原生类型(C 标量/指针/str/bytes)豁免,返回 t.SizeT
- 新增本地化消息 viperLenNoLenMethod
- viperGenericTypeVarCall 10/10 测试通过
2026-08-17 10:32:19 +08:00
TermiNexus bbd8b1022e feat(vipeye-internal): union/fn 别名/extern 无函数体及 builtins 6 函数签名
- union 与 enum/rnum 对齐(union class / union A: 单独转 class)
- fn/fun/func/function 行尾单独使用按 def 处理并报缺函数名,
  后跟 :/=/ 保持标识符,避免误伤 func: 注解、func = x、func(x)
- extern def/fn 声明可省略函数体(无冒号无 pass),: pass 方式保留
- TextMate 高亮与 language-configuration 缩进规则同步(含 inline fn 修饰关键字)
- typeshed builtins.vpi 新增 Asm/LLVMIR/AsmInp/AsmOut/LInp/LOut,
  隐式内置直接可用(签名照抄 vipershed c.vpi)
- viperGenericTypeVarCall 9/9、tokenizer 91 测试通过
2026-08-08 18:31:25 +08:00
TermiNexus 817bc47ee9 feat(vipeye-internal): extern 函数体必须为 pass/None;fn/fun/func/function 作为 def 别名
extern 关键字声明的函数(FunctionNode 记录 viperModifier)函数体只允许 pass 或 None,否则报错;同时 extern 声明函数跳过缺失返回值的检查。fn/fun/func/function 在语句起始(或紧跟修饰关键字)且后跟函数名时按 def 处理。tmLanguage 与 language-configuration 同步支持 def 别名高亮与自动缩进。
2026-08-08 17:29:21 +08:00
TermiNexus e5aacbfd0b feat(vipeye-internal): 修饰关键字收窄为 inline/export/extern,单独使用报错;修复修饰函数自动缩进
state 不再作为关键字(恢复普通标识符,hashlib 的 state: 字段与 self.state 不受影响)。inline/export/extern 在语句起始且未与 def 搭配时报 '修饰关键字必须与 def 搭配使用'(新增 KeywordType.ViperModifier 与 LocMessage);后跟 ':' 的注解用法仍按标识符。tmLanguage 高亮与 language-configuration 的 onEnterRules/increaseIndentPattern 同步(修饰前缀函数回车自动缩进)。
2026-08-08 17:15:10 +08:00
TermiNexus 9c816ec5b9 fix(vipeye-internal): enum/rnum 支持单独使用(enum A: 等价 class A:)
此前只支持 enum/rnum 后跟 class/struct 的前缀形式;用户实际写法为 num A: 直接声明。补充:enum/rnum 在语句起始且后跟类名时按 class 关键字处理;tmLanguage 高亮同步。回归测试新增 enum A:/rnum B: 用例。
2026-08-08 17:01:29 +08:00
TermiNexus 4182a1fd53 feat: 支持 inline/export/extern/state/enum/rnum/struct 关键字
tokenizer 层支持 C 风格修饰/声明关键字:inline/export/extern/state 后跟 def、enum/rnum 后跟 class/struct 时跳过该标识符 token(保留位置与缩进);struct 在语句起始且后跟类名时按 class 关键字处理(避免误伤 import struct as s 等合法用法)。viper.tmLanguage.json 新增对应关键字高亮。新增回归测试(struct 等价 class、修饰 def 等价普通函数、rnum class 嵌套类)。
2026-08-08 16:48:35 +08:00
TermiNexus f4e19ed72a fix(vipeye-internal): c.Deref 对结构体联合类型返回具体类型
c.Deref(p) 对 IntPair | t.CPtr 这类 TypeSet 联合返回用户自定义结构体类实例(CPtr[Po] 返回 Po),使 c.Deref(p).a 解析为 CInt,不再显示 Unknown;C 标量(t.CInt 等)、内置 str/bytes(i8*)、裸指针保持 Unknown,避免 memcpy(c.Deref(out), ...) 等把解引用结果当指针传递的代码引入误报。新增负向回归测试。
2026-08-08 13:15:43 +08:00
TermiNexus ad3eecb077 fix(vipeye-internal): 泛型函数显式类型实参调用不再误报不可下标
PEP 695 风格 fn[T] 的显式类型实参 fn[t.CInt] 在 Viper 方言下直接忽略并按普通函数求值,避免把函数误报为不可下标。新增 double[t.CInt](21) 回归测试;临时测试目录改到工作区内以适配沙箱写权限限制。
2026-08-08 13:01:17 +08:00
TermiNexus a20c643b72 fix(vipeye): 递归发现嵌套子项目配置,修复 G4 等两级子目录导入失败
findViperProjectConfigsInChildDirs 原仅扫描一级子目录,TransPyC/Test/G4 等两级子项目的 project.json 不被发现,其 includes 未加入导入根,导致 Import g4node could not be resolved。

改为递归扫描:深度限制 6,跳过 .git/node_modules/__pycache__ 等常见非项目目录;直接子目录配置优先收集(保持主配置优先级不变),非项目目录再递归深入。
2026-08-08 11:53:53 +08:00
TermiNexus 2b752a7aec fix(vipeye): 修复 REnum 变体字段语义高亮为 property
REnum 变体字段(如 LLVMType.Ptr 的 Pointee)常规声明查找找不到,语义 token 误显示 undefined。根因:描述符协议在 Viper 结构体字段上失效,CPtr 等 C 类型类的 __get__ 查找返回 Unknown 而非 undefined,把字段类型(Value.Ty)污染为 Unknown,导致 x.Ty.Pointee 无法解析。

- typeEvaluator: applyDescriptorAccessMethod 的 isAnyOrUnknown 分支在 Viper 方言下返回 memberType 保留原始字段类型;新增 REnum 变体字段查找辅助(getViperREnumVariantFieldInfo)覆盖诊断与符号查找
- semanticTokenProvider: 空 declInfo 成员访问时用 getTypeOfExpression 求值,非 Unknown/Unbound 渲染为 property
2026-08-08 11:07:37 +08:00
TermiNexus 5e07800c7c fix(vipeye): 支持 project.json 子项目 source_dir 全局导入
findViperProjectConfigsInChildDirs 扫描一级子目录的 .vpj/project.json,
累计 source_dir 与 includes 到 defaultExtraPaths(去重而非覆盖),
使 App 根级 import lib.core.VLogger 可在 TransPyC 目录打开时正确解析。
2026-08-08 11:06:51 +08:00
TermiNexus d98cd60f7b "fix(lsp): 扫描所有子项目配置(含 project.json)并将 source_dir 加入全局导入根,使 App 根级可全局导入"
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-08 02:50:04 +08:00
TermiNexus 63e9757978 "fix(viper): vpjEditor 与命令注册加容错,避免调试双加载时重复注册导致扩展激活失败
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
fix(lsp): 源文件位于执行根之外时仍从同目录解析绝对导入,修复 import lib 无法解析及白色高亮"
2026-08-08 02:20:02 +08:00
TermiNexus 417bc8a2be "fix(viper): vpjEditor 与命令注册加容错,避免调试双加载时重复注册导致扩展激活失败
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
fix(lsp): 源文件位于执行根之外时仍从同目录解析绝对导入,修复 import lib 无法解析及白色高亮"
2026-08-08 02:16:39 +08:00
TermiNexus 11e83eb2be "refactor(analyzer): 清理 Viper 转型后的死代码并优化字典字面量推断
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- 删除 pprof/profiler.ts 与 typeServerProtocolUtils.ts 两个 0 引用文件
- 删除 applyAttributeAccessOverride 中恒不执行的 Python 属性回退块
- 删除 isClassWithAsymmetricAttributeAccessor 死函数及 types.ts 对应字段
- 提升 getTypeOfDictLiteral 循环不变的 getTypeVarScopesForNode 调用
i18n: 本地化消息中 Python 全部替换为 Viper(452 处,14 个语言文件)"
2026-08-07 17:37:27 +08:00
TermiNexus f4ee49dab5 "chore: migrate remaining Python comments to Viper terminology
- Update TSP protocol docs and LSP cancellation temp dir to viper
- Rewrite descriptive comments across providers and benchmarks
- Keep functional pythonPath/pythonVersion CLI params intact"
2026-08-07 04:37:29 +08:00
TermiNexus 19bf95c7ad "chore: remove tracked __pycache__ and unused PyrightSmall.png"
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-07 03:45:14 +08:00
TermiNexus a0b2a75820 "chore: migrate Pyright branding to Vipeye and drop mypy_primer CI
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
- Rewrite README/docs for Vipeye, update CI/Azure pipelines and scripts
- Remove mypy_primer workflows and mypy comparison doc
- Keep upstream links and external tool references intact"
2026-08-07 03:41:48 +08:00
TermiNexus 44d83f4235 "chore: migrate Pyright branding to Vipeye/vipeye across docs and tooling
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
- Rewrite root README and docs for Vipeye
- Rename pyright-test-policy to vipeye-test-policy
- Update CI/Azure pipelines, perfCompare.py and package metadata
- Keep upstream links, external tool params and # pyright: ignore compat"
2026-08-07 03:33:29 +08:00
TermiNexus be9ff90d11 基本对齐了现阶段 Viper 的所有必要功能,但还缺少反向测试
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-05 18:15:53 +08:00
TermiNexus b47f43d5f2 修复了 T(v) 类型初始化
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-04 17:31:52 +08:00
TermiNexus 024366a85a 修复了 CExtern CExport 保留机制等
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-04 16:28:32 +08:00
TermiNexus b3c84af8a7 实现了 __new__ 裸指针返回自动构造 CPtr[T],a:CPtr[T]=T() 自动隐式取指针(暂定),arg.action flow 过滤跳过,CPtr 解引用转发,c.Asm的 inp/out 参数重加和 str<->bytes 互转
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-04 02:17:18 +08:00
TermiNexus e094caeccd 修复了指针运算,指针 getitem 的问题
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-03 00:36:54 +08:00
TermiNexus 0be56b39ae 支持了 ViperOS 的基本高亮,正在完善对 includes 的支持
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-08-02 15:25:19 +08:00
TermiNexus a5d1841126 修复了跨模块 typedef 等问题 2026-08-02 03:29:41 +08:00
TermiNexus ebe3638ff5 基本完善
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-07-30 22:43:21 +08:00
TermiNexus d51754951c 将本项目升级到基本可用的状态,正在细化各个方面,初次打包了实验版本
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-07-30 22:33:31 +08:00
TermiNexus 36c3357d9f 将本项目升级到基本可用的状态,正在细化各个方面,初次打包了实验版本 2026-07-30 22:33:23 +08:00
TermiNexus e126548249 Modified Pyright so its highlighting is closer to Viper
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-07-28 02:56:01 +08:00
TermiNexus e9e4693333 初始化上传
Run mypy_primer on push / Run mypy_primer on push (push) Has been cancelled
Validation / Typecheck (push) Has been cancelled
Validation / Style (push) Has been cancelled
Validation / Test macos-latest (push) Has been cancelled
Validation / Test ubuntu-latest (push) Has been cancelled
Validation / Test windows-latest (push) Has been cancelled
Validation / Build (push) Has been cancelled
Validation / Required (push) Has been cancelled
2026-07-24 17:08:39 +08:00