TermiNexus
|
f31ff4904c
|
chore: 版本号提升至 1.1.427,移除函数 hover 调试信息并更新 README
- 移除 hover 函数时附加的「函数调试信息」区块(位置/修饰符/泛型参数/
参数/返回类型),hover 只保留签名;删除 _addViperFunctionDebugPart /
_getViperParamDebugText / _getViperFunctionReturnType 与随之无用的
ParamCategory / ParameterNode 导入
- viperFunctionHover.test.ts 改为断言「只显示签名、不再含调试信息字段」
- CHANGELOG 拆分:baec16e(1.1.426 发布)之后 14 个提交追加的 16 条
未发布条目移入新增的 ## 1.1.427 段,## 1.1.426 段保留发布时内容
- 版本号 1.1.426 → 1.1.427(vipeye / vscode-vipeye / vipeye-internal 的
package.json 与 package-lock.json 共 6 个文件)
- README(根 + 扩展)更新:修正指针隐式转换规则(同级 + pointee 兼容,
结构体仅允许上转型),补充声明/注解修饰符、[SIZE]T 与 C 风格强转、
virtual class 方法槽赋值、属性名补全/悬停、状态栏分析进度与 LOC 命令
|
2026-09-28 17:01:18 +08:00 |
|
TermiNexus
|
baec16e540
|
feat(vipeye-internal): Viper 1.1.426 语法/语义/补全增强
把 TransPyC 现行语法与 Viper 的类型组合语义补齐到 LSP 侧(编译器 TPC/TPV 不改动):
- 类型描述符:`const` / `volatile` 可前缀任意类型注解并成为硬关键字(仅注解前缀
合法,`const = 1` / `a: const` 报语法错误),解析层脱糖为等价的 `CConst | T` /
`CVolatile | T`,与手写 TypeSet 完全同形;`const T*` 得 `CConst | CPtr[T]`;
`T*` / `&x` 不再要求 import t(回退 builtins 的 rawptr);描述符按「前缀限定符」
渲染(`const int` / `const volatile int` / `const rawptr[int]`)而不泄漏为联合成员
- 新增 `inline while` / `inline for`;`const` / `volatile` / `inline` 高亮为修饰符
- 新增内建类型名 uint / uchar,并把 rawptr / sizet / int8..uint64 / uintfast* /
uintleast* 等内建到 builtins.vpi,任意 Viper 工程无需配置 includes
- 新增 `virtual` / `novirtual` 声明修饰符(等价 @t.CVTable / @t.NoVTable),
含放置位置校验,并并入补全与高亮
- `(T**)x` 两级指针强转修复:指针类型后缀统一按类型表达式求值,不再被当成解引用
- 裸内置内联汇编 / LLVM IR:`__asm__` / `asminp` / `asmout` / `__llvmir__` /
`irinp` / `irout` / `ASM_DESCR`,与 c.* / t.ASM_DESCR 写法等价
- `X | t.CPtr` 在 X 本身是指针时再包一层(HANDLE | t.CPtr = void**),
修复 CreatePipe 一类 LPHANDLE 的「跨级指针隐式转换不允许」误报
- 补全并入 Viper 专有关键字(define / const / volatile / typedef / inline / export /
extern / virtual / novirtual / enum / rnum / union / struct / fn / fun / func / function)
- `T*(x)`:裸模块名 + 模块内同名类归一为 CPtr[bootinfo];并按 TPC `_AtPtrSuffixCall`
的判据把「类型原子 + 紧贴星串 + 紧贴 (」解析为调用,使
`uint32*(info.vendor_id)[0] = res.ebx` 成为合法赋值目标
- 新增「重复声明」检查:模块级已有同名运行期变量时,函数内再用类型注解声明同名
变量无条件报 TypeError(与 TPV AssignGenMixin 同口径);排除 CDefine 宏、CTypedef
别名、同名函数/类与类体成员。合法写法只剩 `global x` + 无注解赋值,或换名
- 支持 `__attribute__`:装饰器 `@__attribute__(...)` 脱糖为
`@c.Attribute(t.attr.X, ...)`;注解修饰器 `a: __attribute__(...) const int`
脱糖为 `t.attr.X | (CConst | int)`;注解联合中的 `t.attr.*` 标记求值为 t.CAttr
修饰符(运算/下标/赋值/展示均按被修饰的基础类型处理);值位置
`volatile f()` / `volatile 结构体()` 前缀;`__a` 补全、括号内属性名补全与悬停、
TextMate 高亮
- 注解位置小写 `callable[[A, B], R]` 等价 t.Callable:parser 仅在类型注解位置把裸名
`callable` 脱糖为 `Callable`,builtins.vpi 内建 `Callable` 别名(无需 import t);
值位置 `callable(x)` 仍是内置函数
- 版本号提升至 1.1.426 并更新 CHANGELOG;新增 6 个回归测试文件、更新 4 个,
全量 64 套件 / 794 用例全绿(另有 1 套件 8 用例为既有 skip)
|
2026-09-27 12:50:02 +08:00 |
|
TermiNexus
|
aa1c84a326
|
feat(vipeye-internal): 支持 typedef 语句与 (T)x 强转写法
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
- typedef:新增 `typedef T1 = T2` 软关键字语句,与 `T1: t.CTypedef = T2` 完全等价。
解析层脱糖为同形「带注解赋值」(合成零长 t.CTypedef 紧贴别名名之后,满足
AST 子节点位置递增不重叠的不变量),绑定/类型求值/hover/语义高亮全部复用
既有 TypeAlias 通路,且不要求文件 import t(合成 t 标记 isViperTypedef,
未导入时静默退化,与 [SIZE]T 脱糖同一取舍)。仅 `typedef <Name> =` 形状生效,
`typedef = 1` / `typedef(x)` 行为不变
- 高亮:viper.tmLanguage.json 为 typedef 增加 storage.type 规则(带 `\s+Name\s*=`
前瞻,避免误伤赋值);语义高亮无需改动(合成名零长,被既有过滤跳过)
- 强转:`(T)x` 与 `(T*)x` 统一按「括号内为类型原子 + 紧跟操作数起点」归一为
Call,等价既有 T(x) 通路;`(T*)[i]` 仍是下标、`(a)*b` 仍是乘法
- 回归用例:viperBuiltinsVpTypedef.test.ts 新增 typedef 3 例(含不 import t 与
typedef 作普通标识符),viperUnaryPointer.test.ts 新增 (T)x 2 例
- 版本号提升至 1.1.425 并更新 CHANGELOG;全量 57 套件 / 764 用例全绿(0 失败)
|
2026-09-22 22:26:07 +08:00 |
|
TermiNexus
|
e7cf7643de
|
feat(vipeye-internal): 支持 (T*)x、(T*)(x)、T*(x) 三种 C 风格强转写法
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 的"新语法类型强转"除已有的调用形式(T(x) / T(x, t.CPtr) / (T)(x) /
(T1|T2)(x))外,还使用指针写法,本次一并支持,三者结果均为指针类型 CPtr[T]:
- operations.getTypeOfUnaryOperation:值上下文里一元 '*' 的操作数是「类型对象」
(可实例化类,如 t.CInt / ast.AST)时,按指针类型表达式求值(CPtr[T]),
不再当作对类对象的解引用而报「不支持运算符 *」
- parser:`(T*)operand` 归一为 CallNode(func = 括号内指针类型, args = [operand]),
与已支持的 `(T*)(x)` 通路完全一致;仅当括号内由 _parseViperPointerTypeSuffix
标记时才生效,`(a)*b`、`(a) * (b)` 等乘法不受影响
- operations.validateBinaryOperation:二元 '*' 的左操作数是类型对象时按强转
(等价 (T*)(x))处理,从而 T*(x) 成立;真值乘法(2 * 3 / offset * 2)零影响
- typeEvaluator:callee 为被标记的指针类型后缀且类型为 CPtr[T] 时按强转返回
CPtr[T] 实例,跳过可调用性/参数校验(函数指针变量调用 fn(x) 不受影响)
- 回归用例:viperUnaryPointer.test.ts 新增「三种 C 风格强转」测试块,
含真实乘法与既有强转通路的对照断言
- 版本号提升至 1.1.424 并更新 CHANGELOG;全量 57 套件 / 759 用例全绿
|
2026-09-22 22:07:58 +08:00 |
|
TermiNexus
|
36dab6433b
|
fix(vipeye-internal): 打通 TransPyC 现行语法的解析/类型检查并清理全部既有失败用例
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
- parser:C 指针后缀(T* / T**)不再限定于类型注解上下文,调用实参同样识别
(va_arg(ap, int64*) / short* / int*),a * b、a ** b、N * 2 等真实运算行为不变
- types:str | t.CPtr、bytes | t.CPtr 折叠为 CPtr[str] / CPtr[bytes](i8**,如 argv),
与 TransPyC 的类型契约一致
- typeEvaluator:CPtr[str|bytes] 下标返回 pointee(str/bytes)而非 char,修 argparse.vp
`token: str = entry[0]` 误报;新增 C 风格强转识别 Type(value, t.CPtr),修
char(addr, t.CPtr) 在 memhub.vp / requests.vp 的误报(int("12", 16) 不受影响)
- flowChartCommand:补 AnalyzerService.run 的 CancellationToken 实参(TS2554),
此前被该编译错误阻塞的 5 个测试套件恢复运行
- 测试维护:ord 断言改为 TransPyC 现行的 def ord(s: char) -> int;
AssignGenMixin.vp 收窄守卫改为不写死行号,抗源码漂移
- 版本号提升至 1.1.423 并更新 CHANGELOG;全量 57 套件 / 758 用例全绿(0 失败)
|
2026-09-22 21:50:58 +08:00 |
|
TermiNexus
|
988ba922f4
|
refactor(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
接上次下标统一:`for ch in s` 的迭代元素,以及 str/bytes 作为 Iterable/Iterator 实参
时的泛型推断(enumerate/zip/map/filter/reversed/sorted/list() 等)也由 t.CChar 别名
int 改为内置 char。至此 `s[i]`、`*s`、迭代三种取字符方式元素类型一致。
删除已无引用的 getViperCCharType 辅助函数。
回归用例:viperEnumerate.test.ts 断言改为 enumerate[char] / ch 为 char。
版本号提升至 1.1.422 并更新 CHANGELOG。
|
2026-09-22 21:28:50 +08:00 |
|
TermiNexus
|
d2f66811fb
|
refactor(vipeye-internal): str/bytes 下标统一返回 char(与 *s 解引用一致)
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
`s[i]` 原返回 t.CChar,而 `*s` 返回 char,同一 i8 元素出现两种显示。现把 str/bytes
的下标通路(普通下标 + TypeSet 下标)统一改为内置 char 对象,二者本就可隐式互转。
迭代(for ch in s)与 Iterable 实参推断仍保持 t.CChar,待确认是否一并统一。
回归用例:viperUnaryPointer.test.ts 中 fmt[0] 断言改为 char。
版本号提升至 1.1.421 并更新 CHANGELOG。
|
2026-09-22 21:26:16 +08:00 |
|
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
|
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
|
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
|
b0f4b8b5fd
|
chore(vipeye): 同步 package-lock 中的包版本号到 1.1.413
|
2026-09-19 17:59:23 +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
|
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
|
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 |
|