chore(syntax): Test 仓 R1 + R12 迁移

R1:T | t.CPtr -> T*(40 文件 / 1121 处;含多级 **、强转位 (T*)(x)、下标内 list[AST*]);引号前向引用 'Rect' | t.CPtr 26 处按例外保留,T | t.CPtr | t.State 25 处因 T* 后不能接 | 保持原联合写法。

R12:i = 0 + while i < N: + 尾 i += 1 -> or i in range(N):(10 文件 / 42 处;含 <= -> range(EXPR + 1)、带注解初始化 i: int = 0、尾 i = i + 1)。余 20 处经守卫判定不可安全改写(复合条件 1、尾部非自增 8、体内重绑定/continue 5、while-else 2、循环后仍被读取 2、找不到初始化 2)。
This commit is contained in:
TermiNexus committed 2026-10-05 21:18:37 +08:00
1 parent f5da836fbb
commit aa5a7e7250
43 files changed
+851 -935

No files matched your search

+6 -6
View File
@@ -26,7 +26,7 @@ def test_for_in_str():
def test_for_in_list():
testcheck.section("Test 3: for v in list[str]")
arena: bytes = stdlib.malloc(65536)
bd: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 65536)
bd: memhub.MemBuddy* = memhub.MemBuddy(arena, 65536)
lst: list[str] = list[str](bd)
lst.append("x")
lst.append("y")
@@ -42,7 +42,7 @@ def test_for_in_list():
def test_zip_list_list():
testcheck.section("Test 4: zip(list, list)")
arena: bytes = stdlib.malloc(65536)
bd: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 65536)
bd: memhub.MemBuddy* = memhub.MemBuddy(arena, 65536)
la: list[str] = list[str](bd)
la.append("a")
la.append("b")
@@ -62,7 +62,7 @@ def test_zip_list_list():
def test_zip_range_list():
testcheck.section("Test 5: zip(range, list)")
arena: bytes = stdlib.malloc(65536)
bd: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 65536)
bd: memhub.MemBuddy* = memhub.MemBuddy(arena, 65536)
lst: list[str] = list[str](bd)
lst.append("p")
lst.append("q")
@@ -89,7 +89,7 @@ def test_zip_str_str():
def test_zip_range_len_list():
testcheck.section("Test 7: zip(range(len), list)")
arena: bytes = stdlib.malloc(65536)
bd: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 65536)
bd: memhub.MemBuddy* = memhub.MemBuddy(arena, 65536)
lst: list[str] = list[str](bd)
lst.append("www")
lst.append("gvsds")
@@ -105,7 +105,7 @@ def test_zip_range_len_list():
def test_enumerate_list():
testcheck.section("Test 8: enumerate(list)")
arena: bytes = stdlib.malloc(65536)
bd: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 65536)
bd: memhub.MemBuddy* = memhub.MemBuddy(arena, 65536)
lst: list[str] = list[str](bd)
lst.append("alpha")
lst.append("beta")
@@ -183,7 +183,7 @@ def test_for_else_empty_range():
def test_for_else_list():
testcheck.section("Test 14: for-else (list[str] 迭代耗尽 → 执行 else)")
arena: bytes = stdlib.malloc(65536)
bd: memhub.MemBuddy | t.CPtr = memhub.MemBuddy(arena, 65536)
bd: memhub.MemBuddy* = memhub.MemBuddy(arena, 65536)
lst: list[str] = list[str](bd)
lst.append("a")
lst.append("b")