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
28 changes: 0 additions & 28 deletions data/fixtures/scopes/c/interior/interior.ternary.scope

This file was deleted.

28 changes: 0 additions & 28 deletions data/fixtures/scopes/csharp/interior/interior.ternary.scope

This file was deleted.

28 changes: 0 additions & 28 deletions data/fixtures/scopes/java/interior/interior.ternary.scope

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions data/fixtures/scopes/python/interior/interior.ternary.scope

This file was deleted.

1 change: 0 additions & 1 deletion data/scopeSupportFacetInfos.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@
- `interior.surroundingPair` The interior scope of a surrounding pair
- `interior.switch` The body of a switch statement
- `interior.switchCase` The body of a switch case branch
- `interior.ternary` The body of a ternary condition/branch
- `interior.try` The body of a try/catch/finally branch
- `interior.while` The body of a while loop

Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/c.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = {
"interior.if": supported,
"interior.switch": supported,
"interior.switchCase": supported,
"interior.ternary": supported,
"interior.for": supported,
"interior.while": supported,
"interior.doWhile": supported,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/csharp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = {
"interior.doWhile": supported,
"interior.switch": supported,
"interior.switchCase": supported,
"interior.ternary": supported,
"interior.try": supported,

"collectionItem.unenclosed.singleLine": supported,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/java.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
"interior.doWhile": supported,
"interior.switch": supported,
"interior.switchCase": supported,
"interior.ternary": supported,
"interior.try": supported,
"interior.resource": supported,
"interior.static": supported,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
"interior.doWhile": supported,
"interior.switch": supported,
"interior.switchCase": supported,
"interior.ternary": supported,
"interior.try": supported,
"interior.static": supported,

Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Element
element: notApplicable,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = {
"interior.try": supported,
"interior.switch": supported,
"interior.switchCase": supported,
"interior.ternary": supported,
"interior.foreach": supported,
"interior.while": supported,
"interior.resource": supported,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/scm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1003,10 +1003,6 @@ export const scopeSupportFacetInfos: Record<
description: "The body of a switch case branch",
scopeType: { type: "interior" },
},
"interior.ternary": {
description: "The body of a ternary condition/branch",
scopeType: { type: "interior" },
},
"interior.for": {
description: "The body of a for loop",
scopeType: { type: "interior" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ export const scopeSupportFacets = [
"interior.try",
"interior.switch",
"interior.switchCase",
"interior.ternary",
"interior.for",
"interior.foreach",
"interior.while",
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/talon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
1 change: 0 additions & 1 deletion packages/common/src/scopeSupportFacets/yaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = {
"branch.ternary": notApplicable,
"branch.ternary.iteration": notApplicable,
"condition.ternary": notApplicable,
"interior.ternary": notApplicable,

// Section
section: notApplicable,
Expand Down
15 changes: 4 additions & 11 deletions queries/c.scm
Original file line number Diff line number Diff line change
Expand Up @@ -433,20 +433,13 @@

;;!! true ? 0 : 1
;;! ^^^^
;;! ^ ^
(conditional_expression
condition: (_) @condition @interior
condition: (_) @condition
consequence: (_) @branch
) @condition.domain @branch.iteration

;;!! true ? 0 : 1
;;! ^
(conditional_expression
consequence: (_) @branch @interior
)

;;!! true ? 0 : 1
;;! ^
(conditional_expression
alternative: (_) @branch @interior
alternative: (_) @branch
)

;;!! int foo, bar;
Expand Down
10 changes: 3 additions & 7 deletions queries/csharp.scm
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,11 @@
;;! ^^^^
;;! ^ ^
(conditional_expression
condition: (_) @condition @interior
condition: (_) @condition
consequence: (_) @branch
) @condition.domain @branch.iteration

(conditional_expression
consequence: (_) @branch @interior
)

(conditional_expression
alternative: (_) @branch @interior
alternative: (_) @branch
)

;;!! class Foo {}
Expand Down
18 changes: 7 additions & 11 deletions queries/java.scm
Original file line number Diff line number Diff line change
Expand Up @@ -323,21 +323,17 @@
(#child-range! @value 0 -1 true true)
) @_.domain

;;!! true ? 1 : 2
;;!! true ? 0 : 1
;;! ^^^^
;;! ^ ^
(ternary_expression
condition: (_) @condition @interior
) @condition.domain
(ternary_expression
consequence: (_) @branch @interior
)
condition: (_) @condition
consequence: (_) @branch
) @condition.domain @branch.iteration
(ternary_expression
alternative: (_) @branch @interior
alternative: (_) @branch
)

;;!! true ? 1 : 2
;;! ^^^^^^^^^^^^
(ternary_expression) @branch.iteration

;;!! void myFunk(int value) {}
;;! ^^^^^
;;! -------------------------
Expand Down
10 changes: 3 additions & 7 deletions queries/javascript.core.scm
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,11 @@
;;! ^ ^
;;! -------------
(ternary_expression
condition: (_) @condition @interior
condition: (_) @condition
consequence: (_) @branch
) @condition.domain @branch.iteration

(ternary_expression
consequence: (_) @branch @interior
)

(ternary_expression
alternative: (_) @branch @interior
alternative: (_) @branch
)

;;!! for (let i = 0; i < 2; ++i) {}
Expand Down
Loading
Loading