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/java/statement/statement.misc.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public record Foo(int a) {}
---

[Content] =
[Removal] =
[Domain] = 0:0-0:27
>---------------------------<
0| public record Foo(int a) {}

[Insertion delimiter] = "\n"
2 changes: 1 addition & 1 deletion packages/common/src/scopeSupportFacets/java.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
"statement.continue": supported,
"statement.resource": supported,
"statement.static": supported,
"statement.misc": supported,
"statement.iteration.document": supported,
"statement.iteration.class": supported,
"statement.iteration.interface": supported,
Expand Down Expand Up @@ -301,7 +302,6 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = {
"value.iteration.enum": notApplicable,

// Miscellaneous
"statement.misc": notApplicable,
pairDelimiter: notApplicable,
regularExpression: notApplicable,
environment: notApplicable,
Expand Down
16 changes: 7 additions & 9 deletions queries/java.scm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
(field_declaration)
(constant_declaration)
(static_initializer)
(record_declaration)

;; Disabled on purpose. We don't consider these to be statements.
;; exceptions
Expand Down Expand Up @@ -138,17 +139,14 @@

;;!! "string"
;;! ^^^^^^^^
(
(string_literal) @string @textFragment
(#character-range! @textFragment 1 -1)
)

;;!! """string"""
;;! ^^^^^^^^^^^^
(
(text_block) @string @textFragment
(#character-range! @textFragment 3 -3)
)
(string_literal) @string
Copy link
Member Author

Choose a reason for hiding this comment

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

This changed with the new version of Java Tree sitter


[
(string_fragment)
(multiline_string_fragment)
] @textFragment

;;!! // comment
;;! ^^^^^^^^^^
Expand Down
Loading