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
17 changes: 17 additions & 0 deletions data/fixtures/scopes/talon/string.singleLine.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
test: "foo"
---

[Content] =
[Domain] = 0:6-0:11
>-----<
0| test: "foo"

[Removal] = 0:5-0:11
>------<
0| test: "foo"

[Leading delimiter] = 0:5-0:6
>-<
0| test: "foo"

[Insertion delimiter] = " "
17 changes: 17 additions & 0 deletions data/fixtures/scopes/talon/string.singleLine2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
test: 'foo'
---

[Content] =
[Domain] = 0:6-0:11
>-----<
0| test: 'foo'

[Removal] = 0:5-0:11
>------<
0| test: 'foo'

[Leading delimiter] = 0:5-0:6
>-<
0| test: 'foo'

[Insertion delimiter] = " "
10 changes: 10 additions & 0 deletions data/fixtures/scopes/talon/textFragment.comment.line.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Hello world
---

[Content] =
[Removal] =
[Domain] = 0:0-0:13
>-------------<
0| # Hello world

[Insertion delimiter] = " "
10 changes: 10 additions & 0 deletions data/fixtures/scopes/talon/textFragment.string.singleLine.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test: "foo"
---

[Content] =
[Removal] =
[Domain] = 0:7-0:10
>---<
0| test: "foo"

[Insertion delimiter] = " "
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
test: 'foo'
---

[Content] =
[Removal] =
[Domain] = 0:7-0:10
>---<
0| test: 'foo'

[Insertion delimiter] = " "
40 changes: 25 additions & 15 deletions packages/common/src/scopeSupportFacets/talon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@ import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";
const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;

export const talonScopeSupport: LanguageScopeSupportFacetMap = {
command: supported,
"interior.command": supported,
"name.field": supported,
"value.field": supported,
"argument.actual.iteration": supported,
"argument.actual": supported,

"comment.line": supported,

"interior.command": supported,

"name.assignment": supported,
"name.field": supported,
"name.variable": supported,
statement: supported,

"statement.iteration.block": supported,
"statement.iteration.document": supported,
"value.variable": supported,

"value.assignment": supported,
"argument.actual": supported,
"argument.actual.iteration": supported,
"value.field": supported,
"value.variable": supported,

command: supported,
statement: supported,

"string.singleLine": supported,

"textFragment.comment.line": supported,
"textFragment.string.singleLine": supported,

// Unsupported

fieldAccess: unsupported,
"string.singleLine": unsupported,
"string.multiLine": unsupported,
"textFragment.comment.line": unsupported,
"textFragment.string.singleLine": unsupported,
"textFragment.string.multiLine": unsupported,
"value.argument.actual": unsupported,
"value.argument.actual.iteration": unsupported,

// Not applicable

Expand Down Expand Up @@ -154,6 +158,10 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"type.typeArgument": notApplicable,
"type.typeArgument.iteration": notApplicable,
"type.variable": notApplicable,
"type.resource": notApplicable,
"type.resource.iteration": notApplicable,
"value.argument.actual": notApplicable,
"value.argument.actual.iteration": notApplicable,
"value.argument.formal": notApplicable,
"value.argument.formal.constructor": notApplicable,
"value.argument.formal.constructor.iteration": notApplicable,
Expand All @@ -171,4 +179,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = {
"value.typeAlias": notApplicable,
"value.variable.pattern": notApplicable,
"value.yield": notApplicable,
"string.multiLine": notApplicable,
"textFragment.string.multiLine": notApplicable,
};
8 changes: 7 additions & 1 deletion queries/talon.scm
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,10 @@ arguments: (implicit_string) @argumentOrParameter.iteration

;;!! # foo
;;! ^^^^^
(comment) @comment
(comment) @comment @textFragment

;;!! "foo"
;;! ^^^^^
(string
(string_content) @textFragment
) @string
Loading