|
| 1 | +import { SimpleScopeTypeType } from "../types/command/PartialTargetDescriptor.types"; |
| 2 | + |
| 3 | +const scopeSupportFacets = [ |
| 4 | + // "list", |
| 5 | + // "list.interior", |
| 6 | + // "map", |
| 7 | + // "map.interior", |
| 8 | + // "collectionKey", |
| 9 | + "namedFunction", |
| 10 | + // "namedFunction.interior", |
| 11 | + // "functionName", |
| 12 | + // "anonymousFunction", |
| 13 | + // "anonymousFunction.interior", |
| 14 | + "name.assignment", |
| 15 | + "key.attribute", |
| 16 | + "key.mapPair", |
| 17 | + "key.mapPair.iteration", |
| 18 | + "value.assignment", |
| 19 | + "value.mapPair", |
| 20 | + "value.mapPair.iteration", |
| 21 | + // "value.assignment.removal", |
| 22 | + // "value.return", |
| 23 | + // "value.return.removal", |
| 24 | + // "value.collectionItem", |
| 25 | + // "value.collectionItem.removal", |
| 26 | + // "statement", |
| 27 | + // "ifStatement", |
| 28 | + // "condition.if", |
| 29 | + // "condition.while", |
| 30 | + // "condition.doWhile", |
| 31 | + // "condition.for", |
| 32 | + // "condition.ternary", |
| 33 | + // "branch", |
| 34 | + // "comment.line", |
| 35 | + // "comment.block", |
| 36 | + // "string.singleLine", |
| 37 | + // "string.multiLine", |
| 38 | + // "textFragment", |
| 39 | + // "functionCall", |
| 40 | + // "functionCallee", |
| 41 | + // "argumentOrParameter.argument", |
| 42 | + // "argumentOrParameter.argument.removal", |
| 43 | + // "argumentOrParameter.parameter", |
| 44 | + // "argumentOrParameter.parameter.removal", |
| 45 | + // "class", |
| 46 | + // "class.interior", |
| 47 | + // "className", |
| 48 | + // "type", |
| 49 | + "tags", |
| 50 | +] as const; |
| 51 | + |
| 52 | +const textualScopeSupportFacets = [ |
| 53 | + "character", |
| 54 | + "word", |
| 55 | + "token", |
| 56 | + "line", |
| 57 | + "paragraph", |
| 58 | + "document", |
| 59 | +] as const; |
| 60 | + |
| 61 | +export interface ScopeSupportFacetInfo { |
| 62 | + readonly description: string; |
| 63 | + readonly scopeType: SimpleScopeTypeType; |
| 64 | + readonly isIteration?: boolean; |
| 65 | +} |
| 66 | + |
| 67 | +export enum ScopeSupportFacetLevel { |
| 68 | + supported, |
| 69 | + unsupported, |
| 70 | + notApplicable, |
| 71 | +} |
| 72 | + |
| 73 | +export type ScopeSupportFacet = (typeof scopeSupportFacets)[number]; |
| 74 | + |
| 75 | +export type TextualScopeSupportFacet = |
| 76 | + (typeof textualScopeSupportFacets)[number]; |
| 77 | + |
| 78 | +export type LanguageScopeSupportFacetMap = Partial< |
| 79 | + Record<ScopeSupportFacet, ScopeSupportFacetLevel> |
| 80 | +>; |
0 commit comments