diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json index 03938caf4f5..1ea8d96bd6c 100644 --- a/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json +++ b/packages/app-web-docs/src/docs/contributing/private-scopes/fixtures/textFragment.json @@ -67,6 +67,23 @@ } ] }, + { + "name": "scopes/clojure/textFragment.regularExpression", + "languageId": "clojure", + "facet": "textFragment.regularExpression", + "code": "#\"^\\w+$\"", + "scopes": [ + { + "targets": [ + { + "content": "0:2-0:7", + "removal": "0:2-0:7" + } + ], + "domain": "0:2-0:7" + } + ] + }, { "name": "scopes/clojure/textFragment.string.multiLine", "languageId": "clojure", @@ -526,6 +543,23 @@ } ] }, + { + "name": "scopes/javascript.core/textFragment/textFragment.regularExpression", + "languageId": "javascript.core", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, { "name": "scopes/javascript.core/textFragment/textFragment.string.multiLine", "languageId": "javascript.core", @@ -1072,7 +1106,7 @@ ] }, { - "name": "scopes/ruby/textFragment.comment.block", + "name": "scopes/ruby/textFragment/textFragment.comment.block", "languageId": "ruby", "facet": "textFragment.comment.block", "code": "=begin\nHello world\n=end", @@ -1089,7 +1123,7 @@ ] }, { - "name": "scopes/ruby/textFragment.comment.line", + "name": "scopes/ruby/textFragment/textFragment.comment.line", "languageId": "ruby", "facet": "textFragment.comment.line", "code": "# Hello world", @@ -1106,7 +1140,24 @@ ] }, { - "name": "scopes/ruby/textFragment.string.multiLine", + "name": "scopes/ruby/textFragment/textFragment.regularExpression", + "languageId": "ruby", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, + { + "name": "scopes/ruby/textFragment/textFragment.string.multiLine", "languageId": "ruby", "facet": "textFragment.string.multiLine", "code": "\"Hello\nworld\"", @@ -1123,7 +1174,7 @@ ] }, { - "name": "scopes/ruby/textFragment.string.singleLine", + "name": "scopes/ruby/textFragment/textFragment.string.singleLine", "languageId": "ruby", "facet": "textFragment.string.singleLine", "code": "\"Hello world\"", @@ -1377,6 +1428,23 @@ } ] }, + { + "name": "scopes/shellscript/textFragment.regularExpression", + "languageId": "shellscript", + "facet": "textFragment.regularExpression", + "code": "[[ $foo =~ ^\\w+$ ]]", + "scopes": [ + { + "targets": [ + { + "content": "0:11-0:16", + "removal": "0:11-0:17" + } + ], + "domain": "0:11-0:16" + } + ] + }, { "name": "scopes/shellscript/textFragment.string.multiLine", "languageId": "shellscript", diff --git a/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx b/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx index 936aab6cd73..f109683831d 100644 --- a/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx +++ b/packages/app-web-docs/src/docs/contributing/private-scopes/textFragment.mdx @@ -97,7 +97,7 @@ The following are internal scopes. They are not intended for user interaction or ##### Ruby - + ##### Rust @@ -177,7 +177,7 @@ The following are internal scopes. They are not intended for user interaction or ##### Ruby - + ##### Rust @@ -233,6 +233,26 @@ The following are internal scopes. They are not intended for user interaction or +### Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + +##### Clojure + + + +##### JavaScript + + + +##### Ruby + + + +##### Shell Script + + + ### Text fragment: String multi line Internally used text fragment consisting of a multi-line string @@ -283,7 +303,7 @@ The following are internal scopes. They are not intended for user interaction or ##### Ruby - + ##### Rust @@ -367,7 +387,7 @@ The following are internal scopes. They are not intended for user interaction or ##### Ruby - + ##### Rust diff --git a/packages/app-web-docs/src/docs/user/languages/clojure.mdx b/packages/app-web-docs/src/docs/user/languages/clojure.mdx index b54a7629962..027c0645927 100644 --- a/packages/app-web-docs/src/docs/user/languages/clojure.mdx +++ b/packages/app-web-docs/src/docs/user/languages/clojure.mdx @@ -145,6 +145,14 @@ Below are visualizations of all our scope tests for this language. These were cr +### Regular expression + +#### 1. Regular expression + +A regular expression + + + ## Internal scopes The following are internal scopes. They are not intended for user interaction or spoken use. These scopes exist solely for internal Cursorless functionality. @@ -179,13 +187,19 @@ The following are internal scopes. They are not intended for user interaction or -#### 2. Text fragment: String multi line +#### 2. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 3. Text fragment: String multi line Internally used text fragment consisting of a multi-line string -#### 3. Text fragment: String single line +#### 4. Text fragment: String single line Internally used text fragment consisting of a single-line string diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/clojure.json b/packages/app-web-docs/src/docs/user/languages/fixtures/clojure.json index 9b63f164beb..aa7dd2b5907 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/clojure.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/clojure.json @@ -408,6 +408,23 @@ } ] }, + { + "name": "scopes/clojure/regularExpression", + "languageId": "clojure", + "facet": "regularExpression", + "code": "#\"^\\w+$\"", + "scopes": [ + { + "targets": [ + { + "content": "0:0-0:8", + "removal": "0:0-0:8" + } + ], + "domain": "0:0-0:8" + } + ] + }, { "name": "scopes/clojure/string.multiLine", "languageId": "clojure", @@ -459,6 +476,23 @@ } ] }, + { + "name": "scopes/clojure/textFragment.regularExpression", + "languageId": "clojure", + "facet": "textFragment.regularExpression", + "code": "#\"^\\w+$\"", + "scopes": [ + { + "targets": [ + { + "content": "0:2-0:7", + "removal": "0:2-0:7" + } + ], + "domain": "0:2-0:7" + } + ] + }, { "name": "scopes/clojure/textFragment.string.multiLine", "languageId": "clojure", diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/javascript.json b/packages/app-web-docs/src/docs/user/languages/fixtures/javascript.json index 5b37731a65a..4bc83d89466 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/javascript.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/javascript.json @@ -5954,6 +5954,23 @@ } ] }, + { + "name": "scopes/javascript.core/textFragment/textFragment.regularExpression", + "languageId": "javascript.core", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, { "name": "scopes/javascript.core/textFragment/textFragment.string.multiLine", "languageId": "javascript.core", diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/javascriptreact.json b/packages/app-web-docs/src/docs/user/languages/fixtures/javascriptreact.json index 5b37731a65a..4bc83d89466 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/javascriptreact.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/javascriptreact.json @@ -5954,6 +5954,23 @@ } ] }, + { + "name": "scopes/javascript.core/textFragment/textFragment.regularExpression", + "languageId": "javascript.core", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, { "name": "scopes/javascript.core/textFragment/textFragment.string.multiLine", "languageId": "javascript.core", diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/ruby.json b/packages/app-web-docs/src/docs/user/languages/fixtures/ruby.json index 4597726ce49..4b491122707 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/ruby.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/ruby.json @@ -3294,7 +3294,7 @@ ] }, { - "name": "scopes/ruby/textFragment.comment.block", + "name": "scopes/ruby/textFragment/textFragment.comment.block", "languageId": "ruby", "facet": "textFragment.comment.block", "code": "=begin\nHello world\n=end", @@ -3311,7 +3311,7 @@ ] }, { - "name": "scopes/ruby/textFragment.comment.line", + "name": "scopes/ruby/textFragment/textFragment.comment.line", "languageId": "ruby", "facet": "textFragment.comment.line", "code": "# Hello world", @@ -3328,7 +3328,24 @@ ] }, { - "name": "scopes/ruby/textFragment.string.multiLine", + "name": "scopes/ruby/textFragment/textFragment.regularExpression", + "languageId": "ruby", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, + { + "name": "scopes/ruby/textFragment/textFragment.string.multiLine", "languageId": "ruby", "facet": "textFragment.string.multiLine", "code": "\"Hello\nworld\"", @@ -3345,7 +3362,7 @@ ] }, { - "name": "scopes/ruby/textFragment.string.singleLine", + "name": "scopes/ruby/textFragment/textFragment.string.singleLine", "languageId": "ruby", "facet": "textFragment.string.singleLine", "code": "\"Hello world\"", diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/shellscript.json b/packages/app-web-docs/src/docs/user/languages/fixtures/shellscript.json index 11871f06bdf..315d3fec84a 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/shellscript.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/shellscript.json @@ -1721,6 +1721,23 @@ } ] }, + { + "name": "scopes/shellscript/textFragment.regularExpression", + "languageId": "shellscript", + "facet": "textFragment.regularExpression", + "code": "[[ $foo =~ ^\\w+$ ]]", + "scopes": [ + { + "targets": [ + { + "content": "0:11-0:16", + "removal": "0:11-0:17" + } + ], + "domain": "0:11-0:16" + } + ] + }, { "name": "scopes/shellscript/textFragment.string.multiLine", "languageId": "shellscript", diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/typescript.json b/packages/app-web-docs/src/docs/user/languages/fixtures/typescript.json index 3f917af1f27..e661ee433da 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/typescript.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/typescript.json @@ -5954,6 +5954,23 @@ } ] }, + { + "name": "scopes/javascript.core/textFragment/textFragment.regularExpression", + "languageId": "javascript.core", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, { "name": "scopes/javascript.core/textFragment/textFragment.string.multiLine", "languageId": "javascript.core", diff --git a/packages/app-web-docs/src/docs/user/languages/fixtures/typescriptreact.json b/packages/app-web-docs/src/docs/user/languages/fixtures/typescriptreact.json index 7cfffbd2385..2fddb763f68 100644 --- a/packages/app-web-docs/src/docs/user/languages/fixtures/typescriptreact.json +++ b/packages/app-web-docs/src/docs/user/languages/fixtures/typescriptreact.json @@ -5954,6 +5954,23 @@ } ] }, + { + "name": "scopes/javascript.core/textFragment/textFragment.regularExpression", + "languageId": "javascript.core", + "facet": "textFragment.regularExpression", + "code": "/^\\w+$/g", + "scopes": [ + { + "targets": [ + { + "content": "0:1-0:6", + "removal": "0:1-0:6" + } + ], + "domain": "0:1-0:6" + } + ] + }, { "name": "scopes/javascript.core/textFragment/textFragment.string.multiLine", "languageId": "javascript.core", diff --git a/packages/app-web-docs/src/docs/user/languages/javascript.mdx b/packages/app-web-docs/src/docs/user/languages/javascript.mdx index afb6fa5bcbf..0f4fa184954 100644 --- a/packages/app-web-docs/src/docs/user/languages/javascript.mdx +++ b/packages/app-web-docs/src/docs/user/languages/javascript.mdx @@ -1545,13 +1545,19 @@ The following are internal scopes. They are not intended for user interaction or -#### 4. Text fragment: String multi line +#### 4. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 5. Text fragment: String multi line Internally used text fragment consisting of a multi-line string -#### 5. Text fragment: String single line +#### 6. Text fragment: String single line Internally used text fragment consisting of a single-line string diff --git a/packages/app-web-docs/src/docs/user/languages/javascriptreact.mdx b/packages/app-web-docs/src/docs/user/languages/javascriptreact.mdx index e042c558120..99e64f82af0 100644 --- a/packages/app-web-docs/src/docs/user/languages/javascriptreact.mdx +++ b/packages/app-web-docs/src/docs/user/languages/javascriptreact.mdx @@ -1545,13 +1545,19 @@ The following are internal scopes. They are not intended for user interaction or -#### 4. Text fragment: String multi line +#### 4. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 5. Text fragment: String multi line Internally used text fragment consisting of a multi-line string -#### 5. Text fragment: String single line +#### 6. Text fragment: String single line Internally used text fragment consisting of a single-line string diff --git a/packages/app-web-docs/src/docs/user/languages/ruby.mdx b/packages/app-web-docs/src/docs/user/languages/ruby.mdx index 38cf5a8a8b6..1995012201f 100644 --- a/packages/app-web-docs/src/docs/user/languages/ruby.mdx +++ b/packages/app-web-docs/src/docs/user/languages/ruby.mdx @@ -973,24 +973,30 @@ The following are internal scopes. They are not intended for user interaction or Internally used text fragment consisting of a block comment - + #### 2. Text fragment: Comment line Internally used text fragment consisting of a line comment - + -#### 3. Text fragment: String multi line +#### 3. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 4. Text fragment: String multi line Internally used text fragment consisting of a multi-line string - + -#### 4. Text fragment: String single line +#### 5. Text fragment: String single line Internally used text fragment consisting of a single-line string - + diff --git a/packages/app-web-docs/src/docs/user/languages/shellscript.mdx b/packages/app-web-docs/src/docs/user/languages/shellscript.mdx index 7494a8712ec..aafa6a23df6 100644 --- a/packages/app-web-docs/src/docs/user/languages/shellscript.mdx +++ b/packages/app-web-docs/src/docs/user/languages/shellscript.mdx @@ -577,13 +577,19 @@ The following are internal scopes. They are not intended for user interaction or -#### 2. Text fragment: String multi line +#### 2. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 3. Text fragment: String multi line Internally used text fragment consisting of a multi-line string -#### 3. Text fragment: String single line +#### 4. Text fragment: String single line Internally used text fragment consisting of a single-line string diff --git a/packages/app-web-docs/src/docs/user/languages/typescript.mdx b/packages/app-web-docs/src/docs/user/languages/typescript.mdx index 785c311af98..404f0d19461 100644 --- a/packages/app-web-docs/src/docs/user/languages/typescript.mdx +++ b/packages/app-web-docs/src/docs/user/languages/typescript.mdx @@ -1879,13 +1879,19 @@ The following are internal scopes. They are not intended for user interaction or -#### 3. Text fragment: String multi line +#### 3. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 4. Text fragment: String multi line Internally used text fragment consisting of a multi-line string -#### 4. Text fragment: String single line +#### 5. Text fragment: String single line Internally used text fragment consisting of a single-line string diff --git a/packages/app-web-docs/src/docs/user/languages/typescriptreact.mdx b/packages/app-web-docs/src/docs/user/languages/typescriptreact.mdx index 76be5587629..8497793513e 100644 --- a/packages/app-web-docs/src/docs/user/languages/typescriptreact.mdx +++ b/packages/app-web-docs/src/docs/user/languages/typescriptreact.mdx @@ -1945,13 +1945,19 @@ The following are internal scopes. They are not intended for user interaction or -#### 4. Text fragment: String multi line +#### 4. Text fragment: Regular expression + +Internally used text fragment consisting of a regular expression literal pattern + + + +#### 5. Text fragment: String multi line Internally used text fragment consisting of a multi-line string -#### 5. Text fragment: String single line +#### 6. Text fragment: String single line Internally used text fragment consisting of a single-line string diff --git a/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json b/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json index 1623983a7fb..564c855b6de 100644 --- a/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json +++ b/packages/app-web-docs/src/docs/user/scopes/fixtures/regularExpression.json @@ -1,4 +1,21 @@ [ + { + "name": "scopes/clojure/regularExpression", + "languageId": "clojure", + "facet": "regularExpression", + "code": "#\"^\\w+$\"", + "scopes": [ + { + "targets": [ + { + "content": "0:0-0:8", + "removal": "0:0-0:8" + } + ], + "domain": "0:0-0:8" + } + ] + }, { "name": "scopes/javascript.core/regularExpression", "languageId": "javascript.core", diff --git a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx index ea65782ec6b..36ff763c890 100644 --- a/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx +++ b/packages/app-web-docs/src/docs/user/scopes/regularExpression.mdx @@ -31,6 +31,10 @@ Default: `regex` A regular expression +##### Clojure + + + ##### JavaScript diff --git a/packages/lib-common/src/scopeSupportFacets/c.ts b/packages/lib-common/src/scopeSupportFacets/c.ts index 8720be76731..9d9848a75d5 100644 --- a/packages/lib-common/src/scopeSupportFacets/c.ts +++ b/packages/lib-common/src/scopeSupportFacets/c.ts @@ -268,6 +268,10 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "key.attribute": notApplicable, "value.attribute": notApplicable, @@ -277,7 +281,6 @@ export const cCoreScopeSupport: LanguageScopeSupportFacetMap = { "statement.misc": notApplicable, environment: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/clojure.ts b/packages/lib-common/src/scopeSupportFacets/clojure.ts index 5c8c18f71f1..4cb60e5e238 100644 --- a/packages/lib-common/src/scopeSupportFacets/clojure.ts +++ b/packages/lib-common/src/scopeSupportFacets/clojure.ts @@ -12,6 +12,7 @@ export const clojureScopeSupport: LanguageScopeSupportFacetMap = { "comment.line": supported, "name.function": supported, anonymousFunction: supported, + regularExpression: supported, namedFunction: supported, "namedFunction.iteration.document": supported, @@ -33,6 +34,7 @@ export const clojureScopeSupport: LanguageScopeSupportFacetMap = { "textFragment.comment.line": supported, "textFragment.string.singleLine": supported, "textFragment.string.multiLine": supported, + "textFragment.regularExpression": supported, /* NOT APPLICABLE */ @@ -371,7 +373,6 @@ export const clojureScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.argument.formal": notApplicable, "type.argument.formal.iteration": notApplicable, "type.argument.formal.lambda": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/csharp.ts b/packages/lib-common/src/scopeSupportFacets/csharp.ts index 587ff541f15..1f6378e5cd3 100644 --- a/packages/lib-common/src/scopeSupportFacets/csharp.ts +++ b/packages/lib-common/src/scopeSupportFacets/csharp.ts @@ -341,13 +341,16 @@ export const csharpScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "statement.misc": notApplicable, "statement.package": notApplicable, "type.return.lambda": notApplicable, environment: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/css.ts b/packages/lib-common/src/scopeSupportFacets/css.ts index 93d25a0a4bc..152ff9ab1c5 100644 --- a/packages/lib-common/src/scopeSupportFacets/css.ts +++ b/packages/lib-common/src/scopeSupportFacets/css.ts @@ -385,11 +385,14 @@ export const cssScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous environment: notApplicable, fieldAccess: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/dart.ts b/packages/lib-common/src/scopeSupportFacets/dart.ts index 8bf3159672d..5fd1c4ad444 100644 --- a/packages/lib-common/src/scopeSupportFacets/dart.ts +++ b/packages/lib-common/src/scopeSupportFacets/dart.ts @@ -337,11 +337,14 @@ export const dartScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "statement.misc": notApplicable, "class.iteration.class": notApplicable, "type.return.lambda": notApplicable, - regularExpression: notApplicable, environment: notApplicable, selector: notApplicable, unit: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/go.ts b/packages/lib-common/src/scopeSupportFacets/go.ts index 4976b5cdbb9..ccb01ab4e94 100644 --- a/packages/lib-common/src/scopeSupportFacets/go.ts +++ b/packages/lib-common/src/scopeSupportFacets/go.ts @@ -362,6 +362,10 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "value.field.interface": notApplicable, "statement.misc": notApplicable, @@ -369,7 +373,6 @@ export const goScopeSupport: LanguageScopeSupportFacetMap = { "type.foreach": notApplicable, "type.cast": notApplicable, "class.iteration.class": notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, pairDelimiter: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/html.ts b/packages/lib-common/src/scopeSupportFacets/html.ts index eaef7e46f37..ef24399a21f 100644 --- a/packages/lib-common/src/scopeSupportFacets/html.ts +++ b/packages/lib-common/src/scopeSupportFacets/html.ts @@ -341,6 +341,10 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { "name.typeAlias": notApplicable, "value.typeAlias": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.break": notApplicable, @@ -370,7 +374,6 @@ export const htmlScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/java.ts b/packages/lib-common/src/scopeSupportFacets/java.ts index 728c86acac5..b6b8d27b5c9 100644 --- a/packages/lib-common/src/scopeSupportFacets/java.ts +++ b/packages/lib-common/src/scopeSupportFacets/java.ts @@ -354,10 +354,13 @@ export const javaScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "type.return.lambda": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, environment: notApplicable, selector: notApplicable, unit: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/javascript.ts b/packages/lib-common/src/scopeSupportFacets/javascript.ts index dc4452dc61f..6a7a2f399df 100644 --- a/packages/lib-common/src/scopeSupportFacets/javascript.ts +++ b/packages/lib-common/src/scopeSupportFacets/javascript.ts @@ -19,6 +19,7 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = { "textFragment.string.multiLine": supported, "textFragment.comment.line": supported, "textFragment.comment.block": supported, + "textFragment.regularExpression": supported, ifStatement: supported, diff --git a/packages/lib-common/src/scopeSupportFacets/json.ts b/packages/lib-common/src/scopeSupportFacets/json.ts index 302561e0d4d..cd18ced665c 100644 --- a/packages/lib-common/src/scopeSupportFacets/json.ts +++ b/packages/lib-common/src/scopeSupportFacets/json.ts @@ -346,6 +346,10 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { "collectionItem.unenclosed.multiLine": notApplicable, "collectionItem.unenclosed.iteration": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.break": notApplicable, @@ -375,7 +379,6 @@ export const jsonScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/kotlin.ts b/packages/lib-common/src/scopeSupportFacets/kotlin.ts index 43541c8f2dc..29e5f1c740e 100644 --- a/packages/lib-common/src/scopeSupportFacets/kotlin.ts +++ b/packages/lib-common/src/scopeSupportFacets/kotlin.ts @@ -349,9 +349,12 @@ export const kotlinScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous environment: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, pairDelimiter: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/latex.ts b/packages/lib-common/src/scopeSupportFacets/latex.ts index c4d1575b964..00b4f23d7a0 100644 --- a/packages/lib-common/src/scopeSupportFacets/latex.ts +++ b/packages/lib-common/src/scopeSupportFacets/latex.ts @@ -346,6 +346,10 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { "statement.typeAlias": notApplicable, "value.typeAlias": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.break": notApplicable, "statement.continue": notApplicable, @@ -373,7 +377,6 @@ export const latexScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/lua.ts b/packages/lib-common/src/scopeSupportFacets/lua.ts index ad3a2130f3b..9cd2ebd545b 100644 --- a/packages/lib-common/src/scopeSupportFacets/lua.ts +++ b/packages/lib-common/src/scopeSupportFacets/lua.ts @@ -357,6 +357,10 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { "value.constant": notApplicable, "type.constant": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.package": notApplicable, @@ -379,7 +383,6 @@ export const luaScopeSupport: LanguageScopeSupportFacetMap = { // Miscellaneous pairDelimiter: notApplicable, environment: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/markdown.ts b/packages/lib-common/src/scopeSupportFacets/markdown.ts index 0ed5c594557..ce14a9dfc5d 100644 --- a/packages/lib-common/src/scopeSupportFacets/markdown.ts +++ b/packages/lib-common/src/scopeSupportFacets/markdown.ts @@ -354,6 +354,10 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { "name.typeAlias": notApplicable, "value.typeAlias": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.break": notApplicable, "statement.continue": notApplicable, @@ -377,7 +381,6 @@ export const markdownScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/php.ts b/packages/lib-common/src/scopeSupportFacets/php.ts index 375a86d4e03..86e5dfc568d 100644 --- a/packages/lib-common/src/scopeSupportFacets/php.ts +++ b/packages/lib-common/src/scopeSupportFacets/php.ts @@ -348,13 +348,16 @@ export const phpScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "statement.misc": notApplicable, "type.variable.initialized": notApplicable, "type.foreach": notApplicable, "type.iteration.block": notApplicable, "class.iteration.class": notApplicable, - regularExpression: notApplicable, environment: notApplicable, selector: notApplicable, unit: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/properties.ts b/packages/lib-common/src/scopeSupportFacets/properties.ts index 8843770c9dc..4443aa0db6a 100644 --- a/packages/lib-common/src/scopeSupportFacets/properties.ts +++ b/packages/lib-common/src/scopeSupportFacets/properties.ts @@ -346,6 +346,10 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "value.iteration.block": notApplicable, "statement.iteration.block": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.break": notApplicable, @@ -393,7 +397,6 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { list: notApplicable, map: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/python.ts b/packages/lib-common/src/scopeSupportFacets/python.ts index 4f1ba398e19..3527fbe775c 100644 --- a/packages/lib-common/src/scopeSupportFacets/python.ts +++ b/packages/lib-common/src/scopeSupportFacets/python.ts @@ -356,13 +356,16 @@ export const pythonScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "statement.misc": notApplicable, "statement.package": notApplicable, "statement.update": notApplicable, "value.resource": notApplicable, environment: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/r.ts b/packages/lib-common/src/scopeSupportFacets/r.ts index 8cad5ebb0ce..26ff8614671 100644 --- a/packages/lib-common/src/scopeSupportFacets/r.ts +++ b/packages/lib-common/src/scopeSupportFacets/r.ts @@ -363,6 +363,10 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = { "collectionItem.unenclosed.multiLine": notApplicable, "collectionItem.unenclosed.iteration": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.package": notApplicable, @@ -388,7 +392,6 @@ export const rScopeSupport: LanguageScopeSupportFacetMap = { "interior.switch": notApplicable, environment: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/ruby.ts b/packages/lib-common/src/scopeSupportFacets/ruby.ts index 021c690b7a5..1bd0934dde5 100644 --- a/packages/lib-common/src/scopeSupportFacets/ruby.ts +++ b/packages/lib-common/src/scopeSupportFacets/ruby.ts @@ -107,6 +107,7 @@ export const rubyScopeSupport: LanguageScopeSupportFacetMap = { "textFragment.comment.line": supported, "textFragment.string.singleLine": supported, "textFragment.string.multiLine": supported, + "textFragment.regularExpression": supported, "name.argument.actual": supported, "name.argument.actual.iteration": supported, diff --git a/packages/lib-common/src/scopeSupportFacets/rust.ts b/packages/lib-common/src/scopeSupportFacets/rust.ts index 332a62d2f57..17e49e0391a 100644 --- a/packages/lib-common/src/scopeSupportFacets/rust.ts +++ b/packages/lib-common/src/scopeSupportFacets/rust.ts @@ -361,13 +361,16 @@ export const rustScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous "statement.misc": notApplicable, "value.field.class": notApplicable, "type.foreach": notApplicable, "class.iteration.class": notApplicable, environment: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, pairDelimiter: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/scala.ts b/packages/lib-common/src/scopeSupportFacets/scala.ts index cca23a67894..4b53e5f6a49 100644 --- a/packages/lib-common/src/scopeSupportFacets/scala.ts +++ b/packages/lib-common/src/scopeSupportFacets/scala.ts @@ -358,9 +358,12 @@ export const scalaScopeSupport: LanguageScopeSupportFacetMap = { subParagraph: notApplicable, part: notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous pairDelimiter: notApplicable, - regularExpression: notApplicable, environment: notApplicable, selector: notApplicable, unit: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/scm.ts b/packages/lib-common/src/scopeSupportFacets/scm.ts index ae6a7283087..d21c3c6a01b 100644 --- a/packages/lib-common/src/scopeSupportFacets/scm.ts +++ b/packages/lib-common/src/scopeSupportFacets/scm.ts @@ -354,6 +354,10 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { "collectionItem.unenclosed.multiLine": notApplicable, "collectionItem.unenclosed.iteration": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.break": notApplicable, "statement.continue": notApplicable, @@ -382,7 +386,6 @@ export const scmScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/scopeSupportFacetInfos.ts b/packages/lib-common/src/scopeSupportFacets/scopeSupportFacetInfos.ts index 9da9aea4db0..31d92fb2f85 100644 --- a/packages/lib-common/src/scopeSupportFacets/scopeSupportFacetInfos.ts +++ b/packages/lib-common/src/scopeSupportFacets/scopeSupportFacetInfos.ts @@ -1251,6 +1251,11 @@ export const scopeSupportFacetInfos: Record< "Internally used text fragment consisting of a multi-line string", scopeType: "textFragment", }, + "textFragment.regularExpression": { + description: + "Internally used text fragment consisting of a regular expression literal pattern", + scopeType: "textFragment", + }, "textFragment.element": { description: "Internally used text fragment consisting of an XML/HTML element interior", diff --git a/packages/lib-common/src/scopeSupportFacets/scopeSupportFacets.types.ts b/packages/lib-common/src/scopeSupportFacets/scopeSupportFacets.types.ts index 5ea3dad7b7e..9cf5b0ed8cf 100644 --- a/packages/lib-common/src/scopeSupportFacets/scopeSupportFacets.types.ts +++ b/packages/lib-common/src/scopeSupportFacets/scopeSupportFacets.types.ts @@ -171,6 +171,7 @@ export const scopeSupportFacets = [ "textFragment.comment.block", "textFragment.string.singleLine", "textFragment.string.multiLine", + "textFragment.regularExpression", "textFragment.element", "disqualifyDelimiter", diff --git a/packages/lib-common/src/scopeSupportFacets/shellscript.ts b/packages/lib-common/src/scopeSupportFacets/shellscript.ts index 1c60bbec90d..cbbb7f920ee 100644 --- a/packages/lib-common/src/scopeSupportFacets/shellscript.ts +++ b/packages/lib-common/src/scopeSupportFacets/shellscript.ts @@ -63,6 +63,7 @@ export const shellscriptScopeSupport: LanguageScopeSupportFacetMap = { "textFragment.comment.line": supported, "textFragment.string.singleLine": supported, "textFragment.string.multiLine": supported, + "textFragment.regularExpression": supported, "name.variable.uninitialized": supported, "name.variable.initialized": supported, diff --git a/packages/lib-common/src/scopeSupportFacets/talon.ts b/packages/lib-common/src/scopeSupportFacets/talon.ts index 55d981b0ff7..44dfb6ba3fd 100644 --- a/packages/lib-common/src/scopeSupportFacets/talon.ts +++ b/packages/lib-common/src/scopeSupportFacets/talon.ts @@ -340,6 +340,10 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { "collectionItem.unenclosed.multiLine": notApplicable, "collectionItem.unenclosed.iteration": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.break": notApplicable, @@ -400,7 +404,6 @@ export const talonScopeSupport: LanguageScopeSupportFacetMap = { map: notApplicable, environment: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, disqualifyDelimiter: notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/talonList.ts b/packages/lib-common/src/scopeSupportFacets/talonList.ts index b8f1d3a60e6..eff99a0d01b 100644 --- a/packages/lib-common/src/scopeSupportFacets/talonList.ts +++ b/packages/lib-common/src/scopeSupportFacets/talonList.ts @@ -341,6 +341,10 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { "value.iteration.block": notApplicable, "statement.iteration.block": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.break": notApplicable, @@ -394,7 +398,6 @@ export const talonListScopeSupport: LanguageScopeSupportFacetMap = { list: notApplicable, map: notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, selector: notApplicable, unit: notApplicable, }; diff --git a/packages/lib-common/src/scopeSupportFacets/xml.ts b/packages/lib-common/src/scopeSupportFacets/xml.ts index 07dbd5d1db9..e79807c7a21 100644 --- a/packages/lib-common/src/scopeSupportFacets/xml.ts +++ b/packages/lib-common/src/scopeSupportFacets/xml.ts @@ -341,6 +341,10 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { "name.typeAlias": notApplicable, "value.typeAlias": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.break": notApplicable, "statement.continue": notApplicable, @@ -370,7 +374,6 @@ export const xmlScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/packages/lib-common/src/scopeSupportFacets/yaml.ts b/packages/lib-common/src/scopeSupportFacets/yaml.ts index 3c2ec852bd8..7439b41ff17 100644 --- a/packages/lib-common/src/scopeSupportFacets/yaml.ts +++ b/packages/lib-common/src/scopeSupportFacets/yaml.ts @@ -345,6 +345,10 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { "name.typeAlias": notApplicable, "value.typeAlias": notApplicable, + // Regular expression literal + regularExpression: notApplicable, + "textFragment.regularExpression": notApplicable, + // Miscellaneous statements "statement.misc": notApplicable, "statement.break": notApplicable, @@ -374,7 +378,6 @@ export const yamlScopeSupport: LanguageScopeSupportFacetMap = { "name.iteration.block": notApplicable, "name.iteration.document": notApplicable, pairDelimiter: notApplicable, - regularExpression: notApplicable, "type.cast": notApplicable, "type.typeArgument": notApplicable, "type.typeArgument.iteration": notApplicable, diff --git a/resources/fixtures/scope-support-facet-infos.md b/resources/fixtures/scope-support-facet-infos.md index e1b9884dd17..c05b57d170f 100644 --- a/resources/fixtures/scope-support-facet-infos.md +++ b/resources/fixtures/scope-support-facet-infos.md @@ -430,6 +430,7 @@ - `textFragment.comment.block` Internally used text fragment consisting of a block comment - `textFragment.comment.line` Internally used text fragment consisting of a line comment - `textFragment.element` Internally used text fragment consisting of an XML/HTML element interior +- `textFragment.regularExpression` Internally used text fragment consisting of a regular expression literal pattern - `textFragment.string.multiLine` Internally used text fragment consisting of a multi-line string - `textFragment.string.singleLine` Internally used text fragment consisting of a single-line string diff --git a/resources/fixtures/scopes/clojure/regularExpression.scope b/resources/fixtures/scopes/clojure/regularExpression.scope new file mode 100644 index 00000000000..f78eeb9a98b --- /dev/null +++ b/resources/fixtures/scopes/clojure/regularExpression.scope @@ -0,0 +1,10 @@ +#"^\w+$" +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:8 + >--------< +0| #"^\w+$" + +[Insertion delimiter] = " " diff --git a/resources/fixtures/scopes/clojure/textFragment.regularExpression.scope b/resources/fixtures/scopes/clojure/textFragment.regularExpression.scope new file mode 100644 index 00000000000..60d5f1bdfdf --- /dev/null +++ b/resources/fixtures/scopes/clojure/textFragment.regularExpression.scope @@ -0,0 +1,10 @@ +#"^\w+$" +--- + +[Content] = +[Removal] = +[Domain] = 0:2-0:7 + >-----< +0| #"^\w+$" + +[Insertion delimiter] = " " diff --git a/resources/fixtures/scopes/javascript.core/textFragment/textFragment.regularExpression.scope b/resources/fixtures/scopes/javascript.core/textFragment/textFragment.regularExpression.scope new file mode 100644 index 00000000000..942561437a9 --- /dev/null +++ b/resources/fixtures/scopes/javascript.core/textFragment/textFragment.regularExpression.scope @@ -0,0 +1,10 @@ +/^\w+$/g +--- + +[Content] = +[Removal] = +[Domain] = 0:1-0:6 + >-----< +0| /^\w+$/g + +[Insertion delimiter] = " " diff --git a/resources/fixtures/scopes/ruby/textFragment.comment.block.scope b/resources/fixtures/scopes/ruby/textFragment/textFragment.comment.block.scope similarity index 100% rename from resources/fixtures/scopes/ruby/textFragment.comment.block.scope rename to resources/fixtures/scopes/ruby/textFragment/textFragment.comment.block.scope diff --git a/resources/fixtures/scopes/ruby/textFragment.comment.line.scope b/resources/fixtures/scopes/ruby/textFragment/textFragment.comment.line.scope similarity index 100% rename from resources/fixtures/scopes/ruby/textFragment.comment.line.scope rename to resources/fixtures/scopes/ruby/textFragment/textFragment.comment.line.scope diff --git a/resources/fixtures/scopes/ruby/textFragment/textFragment.regularExpression.scope b/resources/fixtures/scopes/ruby/textFragment/textFragment.regularExpression.scope new file mode 100644 index 00000000000..942561437a9 --- /dev/null +++ b/resources/fixtures/scopes/ruby/textFragment/textFragment.regularExpression.scope @@ -0,0 +1,10 @@ +/^\w+$/g +--- + +[Content] = +[Removal] = +[Domain] = 0:1-0:6 + >-----< +0| /^\w+$/g + +[Insertion delimiter] = " " diff --git a/resources/fixtures/scopes/ruby/textFragment.string.multiLine.scope b/resources/fixtures/scopes/ruby/textFragment/textFragment.string.multiLine.scope similarity index 100% rename from resources/fixtures/scopes/ruby/textFragment.string.multiLine.scope rename to resources/fixtures/scopes/ruby/textFragment/textFragment.string.multiLine.scope diff --git a/resources/fixtures/scopes/ruby/textFragment.string.singleLine.scope b/resources/fixtures/scopes/ruby/textFragment/textFragment.string.singleLine.scope similarity index 100% rename from resources/fixtures/scopes/ruby/textFragment.string.singleLine.scope rename to resources/fixtures/scopes/ruby/textFragment/textFragment.string.singleLine.scope diff --git a/resources/fixtures/scopes/shellscript/textFragment.regularExpression.scope b/resources/fixtures/scopes/shellscript/textFragment.regularExpression.scope new file mode 100644 index 00000000000..c41400363c0 --- /dev/null +++ b/resources/fixtures/scopes/shellscript/textFragment.regularExpression.scope @@ -0,0 +1,21 @@ +[[ $foo =~ ^\w+$ ]] +--- + +[Content] = +[Domain] = 0:11-0:16 + >-----< +0| [[ $foo =~ ^\w+$ ]] + +[Removal] = 0:11-0:17 + >------< +0| [[ $foo =~ ^\w+$ ]] + +[Leading delimiter] = 0:10-0:11 + >-< +0| [[ $foo =~ ^\w+$ ]] + +[Trailing delimiter] = 0:16-0:17 + >-< +0| [[ $foo =~ ^\w+$ ]] + +[Insertion delimiter] = " " diff --git a/resources/queries/clojure.scm b/resources/queries/clojure.scm index c844805c6bc..fe3baed6c15 100644 --- a/resources/queries/clojure.scm +++ b/resources/queries/clojure.scm @@ -14,6 +14,13 @@ (#character-range! @textFragment 1 -1) ) +;;!! #"^\w+$" +;;! ^^^^^ +( + (regex_lit) @regularExpression @textFragment + (#character-range! @textFragment 2 -1) +) + ;;!! {:aaa 0 :bbb 1} ;;! ^^^^^^^^^^^^^^^ ( diff --git a/resources/queries/ruby.scm b/resources/queries/ruby.scm index 7e8069e509a..bae7dd20734 100644 --- a/resources/queries/ruby.scm +++ b/resources/queries/ruby.scm @@ -166,7 +166,10 @@ (heredoc_content) @textFragment ;;!! /foo/ -(regex) @regularExpression +( + (regex) @regularExpression @textFragment + (#child-range! @textFragment 0 -1 true true) +) ;;!! foo() ;;! ^^^^^