Skip to content

Commit

Permalink
Fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Sep 30, 2024
1 parent 861d6bd commit ae98588
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1989,7 +1989,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down Expand Up @@ -2507,7 +2507,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down Expand Up @@ -2801,16 +2801,16 @@
},
{
"c": "t",
"t": "variable variable.other.constant",
"t": "variable",
"r": {
"dark_plus": "variable.other.constant: #4FC1FF",
"light_plus": "variable.other.constant: #0070C1",
"dark_plus": "variable: #9CDCFE",
"light_plus": "variable: #001080",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "variable: #9CDCFE",
"dark_modern": "variable.other.constant: #4FC1FF",
"hc_light": "variable.other.constant: #02715D",
"light_modern": "variable.other.constant: #0070C1"
"dark_modern": "variable: #9CDCFE",
"hc_light": "variable: #001080",
"light_modern": "variable: #001080"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,16 @@
},
{
"c": "timeRange",
"t": "variable variable.other.constant",
"t": "variable",
"r": {
"dark_plus": "variable.other.constant: #4FC1FF",
"light_plus": "variable.other.constant: #0070C1",
"dark_plus": "variable: #9CDCFE",
"light_plus": "variable: #001080",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "variable: #9CDCFE",
"dark_modern": "variable.other.constant: #4FC1FF",
"hc_light": "variable.other.constant: #02715D",
"light_modern": "variable.other.constant: #0070C1"
"dark_modern": "variable: #9CDCFE",
"hc_light": "variable: #001080",
"light_modern": "variable: #001080"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,16 @@
},
{
"c": "foo",
"t": "variable entity.name.function variable.other.constant",
"t": "variable entity.name.function",
"r": {
"dark_plus": "variable.other.constant: #4FC1FF",
"light_plus": "variable.other.constant: #0070C1",
"dark_plus": "entity.name.function: #DCDCAA",
"light_plus": "entity.name.function: #795E26",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "variable: #9CDCFE",
"dark_modern": "variable.other.constant: #4FC1FF",
"hc_light": "variable.other.constant: #02715D",
"light_modern": "variable.other.constant: #0070C1"
"hc_black": "entity.name.function: #DCDCAA",
"dark_modern": "entity.name.function: #DCDCAA",
"hc_light": "entity.name.function: #5E2CBC",
"light_modern": "entity.name.function: #795E26"
}
},
{
Expand Down Expand Up @@ -169,7 +169,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
},
{
"c": "constructor",
"t": "variable meta.definition.method entity.name.function storage.type",
"t": "variable meta.definition.method storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down Expand Up @@ -1457,7 +1457,7 @@
},
{
"c": "constructor",
"t": "variable meta.definition.method entity.name.function storage.type",
"t": "variable meta.definition.method storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down Expand Up @@ -2717,7 +2717,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down Expand Up @@ -3319,7 +3319,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down Expand Up @@ -3879,7 +3879,7 @@
},
{
"c": "=>",
"t": "keyword.operator storage.type",
"t": "storage.type",
"r": {
"dark_plus": "storage.type: #569CD6",
"light_plus": "storage.type: #0000FF",
Expand Down
10 changes: 3 additions & 7 deletions src/vs/editor/common/languages/highlights/typescript.scm
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@
(function_declaration
name: (identifier) @entity.name.function)
(method_definition
name: (property_identifier) @meta.definition.method @entity.name.function)
name: (property_identifier) @meta.definition.method @entity.name.function
(#not-eq? @entity.name.function "constructor"))
(method_definition
name: (property_identifier) @storage.type
name: (property_identifier) @meta.definition.method @storage.type
(#eq? @storage.type "constructor"))
(method_signature
name: (property_identifier) @meta.definition.method @entity.name.function)
Expand Down Expand Up @@ -109,10 +110,6 @@
(predefined_type (["string" "boolean" "number" "any"])) @support.type.primitive
(type_identifier) @entity.name.type

(("const")
(variable_declarator
name: (identifier) @variable.other.constant))

([
(identifier)
(shorthand_property_identifier)
Expand Down Expand Up @@ -192,7 +189,6 @@
"<<="
"=="
"!="
"=>"
">>"
">>="
">>>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ class TreeSitterTokenizationSupport extends Disposable implements ITreeSitterTok

// Check that the current token doesn't just replace the last token
if ((previousTokenStartOffset + currentTokenLength) === originalPreviousTokenEndOffset) {
// Current token and previous token span the exact same characters
endOffsetsAndScopes[tokenIndex - 1].scopes.push(capture.name);
// Current token and previous token span the exact same characters, replace the last scope
endOffsetsAndScopes[tokenIndex - 1].scopes[endOffsetsAndScopes[tokenIndex - 1].scopes.length - 1] = capture.name;
} else {
// The current token is within the previous token. Adjust the end of the previous token.
endOffsetsAndScopes[tokenIndex - 1].endOffset = intermediateTokenOffset;
Expand Down

0 comments on commit ae98588

Please sign in to comment.