-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into contiguous_scope
- Loading branch information
Showing
97 changed files
with
2,620 additions
and
94 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
packages/common/src/scopeSupportFacets/getLanguageScopeSupport.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
import { htmlScopeSupport } from "./html"; | ||
import { javaScopeSupport } from "./java"; | ||
import { javascriptScopeSupport } from "./javascript"; | ||
import { pythonScopeSupport } from "./python"; | ||
import { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types"; | ||
import { talonScopeSupport } from "./talon"; | ||
import { typescriptScopeSupport } from "./typescript"; | ||
|
||
export function getLanguageScopeSupport( | ||
languageId: string, | ||
): LanguageScopeSupportFacetMap { | ||
switch (languageId) { | ||
case "javascript": | ||
return javascriptScopeSupport; | ||
case "typescript": | ||
return typescriptScopeSupport; | ||
case "java": | ||
return javaScopeSupport; | ||
case "python": | ||
return pythonScopeSupport; | ||
case "html": | ||
return htmlScopeSupport; | ||
case "talon": | ||
return talonScopeSupport; | ||
} | ||
throw Error(`Unsupported language: '${languageId}'`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
|
||
import { | ||
LanguageScopeSupportFacetMap, | ||
ScopeSupportFacetLevel, | ||
} from "./scopeSupportFacets.types"; | ||
|
||
const { supported, notApplicable } = ScopeSupportFacetLevel; | ||
|
||
export const javaScopeSupport: LanguageScopeSupportFacetMap = { | ||
"name.foreach": supported, | ||
"value.foreach": supported, | ||
"type.foreach": supported, | ||
|
||
element: notApplicable, | ||
tags: notApplicable, | ||
attribute: notApplicable, | ||
"key.attribute": notApplicable, | ||
"value.attribute": notApplicable, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
|
||
import { | ||
LanguageScopeSupportFacetMap, | ||
ScopeSupportFacetLevel, | ||
} from "./scopeSupportFacets.types"; | ||
|
||
const { supported, supportedLegacy, notApplicable } = ScopeSupportFacetLevel; | ||
|
||
export const pythonScopeSupport: LanguageScopeSupportFacetMap = { | ||
"name.foreach": supported, | ||
"value.foreach": supported, | ||
|
||
"argument.actual": supportedLegacy, | ||
"argument.actual.iteration": supportedLegacy, | ||
"argument.formal": supportedLegacy, | ||
"argument.formal.iteration": supportedLegacy, | ||
|
||
element: notApplicable, | ||
tags: notApplicable, | ||
attribute: notApplicable, | ||
"key.attribute": notApplicable, | ||
"value.attribute": notApplicable, | ||
}; |
Oops, something went wrong.