|
1 | | -import type { |
2 | | - ScopeSupportFacet, |
3 | | - ScopeType, |
4 | | - TextualScopeSupportFacet, |
5 | | -} from "@cursorless/common"; |
| 1 | +import type { ScopeSupportFacet } from "@cursorless/common"; |
6 | 2 | import { |
7 | 3 | asyncSafety, |
8 | 4 | languageScopeSupport, |
9 | | - scopeSupportFacetInfos, |
10 | 5 | ScopeSupportFacetLevel, |
11 | 6 | shouldUpdateFixtures, |
12 | 7 | textualScopeSupportFacetInfos, |
@@ -160,28 +155,28 @@ async function runTest(file: string, languageId: string, facetId: string) { |
160 | 155 | // } |
161 | 156 | } |
162 | 157 |
|
163 | | -function getFacetInfo( |
164 | | - languageId: string, |
165 | | - facetId: string, |
166 | | -): { |
167 | | - scopeType: ScopeType; |
168 | | - isIteration: boolean; |
169 | | -} { |
170 | | - const facetInfo = |
171 | | - languageId === "textual" |
172 | | - ? textualScopeSupportFacetInfos[facetId as TextualScopeSupportFacet] |
173 | | - : scopeSupportFacetInfos[facetId as ScopeSupportFacet]; |
174 | | - |
175 | | - if (facetInfo == null) { |
176 | | - throw Error(`Missing scope support facet info for: ${facetId}`); |
177 | | - } |
178 | | - |
179 | | - const { scopeType, isIteration } = facetInfo; |
180 | | - const fullScopeType = |
181 | | - typeof scopeType === "string" ? { type: scopeType } : scopeType; |
182 | | - |
183 | | - return { |
184 | | - scopeType: fullScopeType, |
185 | | - isIteration: isIteration ?? false, |
186 | | - }; |
187 | | -} |
| 158 | +// function getFacetInfo( |
| 159 | +// languageId: string, |
| 160 | +// facetId: string, |
| 161 | +// ): { |
| 162 | +// scopeType: ScopeType; |
| 163 | +// isIteration: boolean; |
| 164 | +// } { |
| 165 | +// const facetInfo = |
| 166 | +// languageId === "textual" |
| 167 | +// ? textualScopeSupportFacetInfos[facetId as TextualScopeSupportFacet] |
| 168 | +// : scopeSupportFacetInfos[facetId as ScopeSupportFacet]; |
| 169 | + |
| 170 | +// if (facetInfo == null) { |
| 171 | +// throw Error(`Missing scope support facet info for: ${facetId}`); |
| 172 | +// } |
| 173 | + |
| 174 | +// const { scopeType, isIteration } = facetInfo; |
| 175 | +// const fullScopeType = |
| 176 | +// typeof scopeType === "string" ? { type: scopeType } : scopeType; |
| 177 | + |
| 178 | +// return { |
| 179 | +// scopeType: fullScopeType, |
| 180 | +// isIteration: isIteration ?? false, |
| 181 | +// }; |
| 182 | +// } |
0 commit comments