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
10 changes: 10 additions & 0 deletions data/fixtures/scopes/javascript.core/pairDelimiter.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
taggedTemplate`hello ${world}`
---

[Content] =
[Removal] =
[Domain] = 0:0-0:15
>---------------<
0| taggedTemplate`hello ${world}`

[Insertion delimiter] = " "
1 change: 1 addition & 0 deletions packages/common/src/scopeSupportFacets/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
switchStatementSubject: supported,
fieldAccess: supported,
disqualifyDelimiter: supported,
pairDelimiter: supported,

"textFragment.string.singleLine": supported,
"textFragment.string.multiLine": supported,
Expand Down
10 changes: 10 additions & 0 deletions queries/javascript.core.scm
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,16 @@
(template_string)
] @string

;; taggedTemplate`hello ${world}`
;;! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(call_expression
function: (_) @pairDelimiter.start
arguments: (template_string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actual function call would be something like arguments: (arguments...

.
"`" @pairDelimiter.end
)
)

;;!! // comment
;;! ^^^^^^^^^^
(comment) @comment
Expand Down
Loading