♻️ refactor(vscode): 代码阅读的翻译插件只经契约拿语言插件的词性和推导式结构

This commit is contained in:
cruldra committed 2026-09-26 16:24:36 +08:00
1 parent 07eaf96a6b
commit 202fa954ba
12 files changed
+185 -76

No files matched your search

@@ -2,7 +2,7 @@ import type { IterationFacts, Node } from '../contract'
import type { Outline } from '../testSupport'
import { describe, expect, it } from 'vitest'
import { factsByLine, nodesToText, outline, readFixture, runtime, WASM_DIR, withBlocks } from '../testSupport'
import { createPythonAdapter, pythonIteration } from './python'
import { createPythonAdapter } from './python'
const adapter = createPythonAdapter(WASM_DIR)
@@ -335,7 +335,7 @@ describe('python 写在表达式里的遍历(推导式)', () => {
try {
const found: IterationFacts[] = []
const visit = (node: Node): void => {
const facts = pythonIteration(node)
const facts = adapter.iteration?.(node)
if (facts)
found.push(facts)
for (const child of node.children) {