Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions data/scopeSupportFacetInfos.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,9 @@

- `namedFunction` A named function declaration
- `namedFunction.constructor` A constructor declaration in a class
- `namedFunction.iteration.block` Iteration scope for named functions: statement blocks (body of functions/if-statements/for-loops/etc).
- `namedFunction.iteration.class` Iteration scope for named functions: class bodies.
- `namedFunction.iteration.document` Iteration scope for named functions: the entire document including leading and trailing empty lines.
- `namedFunction.method` A named method declaration in a class
- `namedFunction.method.iteration.class` Iteration scope for named functions: class bodies.

### nonWhitespaceSequence

Expand Down
5 changes: 1 addition & 4 deletions packages/common/src/scopeSupportFacets/c.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
// Nested class
"class.iteration.block": notApplicable,

// Nested function
"namedFunction.iteration.block": notApplicable,

// Try catch
"branch.try": notApplicable,
"branch.try.iteration": notApplicable,
Expand Down Expand Up @@ -279,7 +276,7 @@ export const cScopeSupport: LanguageScopeSupportFacetMap = {
"name.argument.formal.method.iteration": notApplicable,
"name.argument.formal.method": notApplicable,
"name.method": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,
"namedFunction.method": notApplicable,
"type.argument.formal.method.iteration": notApplicable,
"type.argument.formal.method": notApplicable,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/scopeSupportFacets/cpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const cppScopeSupport: LanguageScopeSupportFacetMap = {
"functionCallee.constructor": supported,

"namedFunction.method": supported,
"namedFunction.method.iteration.class": supported,
"namedFunction.iteration.class": supported,
"namedFunction.constructor": supported,

"name.argument.formal.method": supported,
Expand Down
5 changes: 1 addition & 4 deletions packages/common/src/scopeSupportFacets/csharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
"namedFunction.iteration.document": supported,
"namedFunction.constructor": supported,
"namedFunction.method": supported,
"namedFunction.method.iteration.class": supported,
"namedFunction.iteration.class": supported,

"branch.if": supported,
"branch.if.elif.else": supported,
Expand Down Expand Up @@ -225,9 +225,6 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
"value.argument.actual": notApplicable,
"value.argument.actual.iteration": notApplicable,

// Functions in blocks
"namedFunction.iteration.block": notApplicable,

// Resource syntax
"interior.resource": notApplicable,
"type.resource": notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -199,7 +199,6 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
"name.variable": notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
namedFunction: notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -178,7 +178,6 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable": notApplicable,
"name.namespace": notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
"section.iteration.document": notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/java.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {

"namedFunction.constructor": supported,
"namedFunction.method": supported,
"namedFunction.method.iteration.class": supported,
"namedFunction.iteration.class": supported,

ifStatement: supported,
statement: supported,
Expand Down Expand Up @@ -190,7 +190,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
// Functions (not methods)
namedFunction: notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.iteration.block": notApplicable,
"argument.formal.singleLine": notApplicable,
"argument.formal.multiLine": notApplicable,
"argument.formal.iteration": notApplicable,
Expand Down
5 changes: 1 addition & 4 deletions packages/common/src/scopeSupportFacets/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
namedFunction: supported,
"namedFunction.iteration.document": supported,
"namedFunction.method": supported,
"namedFunction.method.iteration.class": supported,
"namedFunction.iteration.class": supported,
"namedFunction.constructor": supported,

functionCall: supported,
Expand Down Expand Up @@ -180,9 +180,6 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
// Nested classes
"class.iteration.block": notApplicable,

// Nested functions. Technically supported, but creates problem with `every funk` in a method.
"namedFunction.iteration.block": notApplicable,

// Section
section: notApplicable,
"section.iteration.document": notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -191,7 +191,6 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
namedFunction: notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
notebookCell: notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -189,7 +189,6 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
namedFunction: notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
pairDelimiter: notApplicable,
Expand Down
5 changes: 1 addition & 4 deletions packages/common/src/scopeSupportFacets/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
"namedFunction.constructor": supported,
"namedFunction.iteration.document": supported,
"namedFunction.method": supported,
"namedFunction.method.iteration.class": supported,
"namedFunction.iteration.class": supported,

"argument.actual.singleLine": supported,
"argument.actual.multiLine": supported,
Expand Down Expand Up @@ -228,9 +228,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
// Nested classes
"class.iteration.block": notApplicable,

// Nested functions. Technically supported, but creates problem with `every funk` in a method.
"namedFunction.iteration.block": notApplicable,

// Type. Python have some types, but not these.
"type.alias": notApplicable,
"type.cast": notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -189,7 +189,6 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
namedFunction: notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
notebookCell: notApplicable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,15 @@ export const scopeSupportFacetInfos: Record<
description: "A named method declaration in a class",
scopeType: "namedFunction",
},
"namedFunction.method.iteration.class": classIter(
"namedFunction",
"named functions",
),
"namedFunction.constructor": {
description: "A constructor declaration in a class",
scopeType: "namedFunction",
},
"namedFunction.iteration.block": blockIter(
"namedFunction.iteration.document": documentIter(
"namedFunction",
"named functions",
),
"namedFunction.iteration.document": documentIter(
"namedFunction.iteration.class": classIter(
"namedFunction",
"named functions",
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ export const scopeSupportFacets = [
"anonymousFunction",

"namedFunction",
"namedFunction.iteration.block",
"namedFunction.iteration.document",
"namedFunction.method",
"namedFunction.method.iteration.class",
"namedFunction.constructor",
"namedFunction.method",
"namedFunction.iteration.document",
"namedFunction.iteration.class",

"functionCall",
"functionCall.constructor",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/scopeSupportFacets/scss.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const scssScopeSupport: LanguageScopeSupportFacetMap = {
"comment.line": supported,

namedFunction: supported,
"namedFunction.iteration.block": supported,
"namedFunction.iteration.class": supported,
"namedFunction.iteration.document": supported,

"name.argument.formal": supported,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/talon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -204,7 +204,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
namedFunction: notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
notebookCell: notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -188,7 +188,6 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
namedFunction: notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
notebookCell: notApplicable,
Expand Down
3 changes: 1 addition & 2 deletions packages/common/src/scopeSupportFacets/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = {
"value.field.class": notApplicable,
"value.iteration.class": notApplicable,
"interior.class": notApplicable,
"namedFunction.method.iteration.class": notApplicable,
"namedFunction.iteration.class": notApplicable,

// Interface
"statement.interface": notApplicable,
Expand Down Expand Up @@ -195,7 +195,6 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = {
"name.variable.pattern": notApplicable,
namedFunction: notApplicable,
"namedFunction.constructor": notApplicable,
"namedFunction.iteration.block": notApplicable,
"namedFunction.iteration.document": notApplicable,
"namedFunction.method": notApplicable,
notebookCell: notApplicable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ For example, if you'd like to add support for the `namedFunction` facet of the `
```ts
namedFunction: supported,
"namedFunction.method": supported,
"namedFunction.method.iteration.class": supported,
"namedFunction.iteration.class": supported,
"namedFunction.constructor": supported,
"namedFunction.iteration.block": supported,
"namedFunction.iteration.document": supported,
```

Expand Down
Loading