Improve syntax highlights (#18728)
Closes #18722 - Replace the `@escape` capture name with `@string.escape` for escape sequences in Go, Python, Regex, Racket, Ruby, and Scheme. - Rust - Add syntax highlighting for escape sequences. Close #18722 - Fix the issue where `@punctuation.delimiter` is being overwritten by `@operator`. - Add the period (".") to `@punctuation.delimiter`. Release Notes: - N/A
This commit is contained in:
parent
1cbaca667f
commit
f05b440572
7 changed files with 9 additions and 10 deletions
|
@ -102,7 +102,7 @@
|
||||||
(rune_literal)
|
(rune_literal)
|
||||||
] @string
|
] @string
|
||||||
|
|
||||||
(escape_sequence) @escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
[
|
[
|
||||||
(int_literal)
|
(int_literal)
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
(comment) @comment
|
(comment) @comment
|
||||||
(string) @string
|
(string) @string
|
||||||
(escape_sequence) @escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
[
|
[
|
||||||
"("
|
"("
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
(end_assertion)
|
(end_assertion)
|
||||||
(boundary_assertion)
|
(boundary_assertion)
|
||||||
(non_boundary_assertion)
|
(non_boundary_assertion)
|
||||||
] @escape
|
] @string.escape
|
||||||
|
|
||||||
[
|
[
|
||||||
"*"
|
"*"
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
">" @punctuation.bracket)
|
">" @punctuation.bracket)
|
||||||
|
|
||||||
[
|
[
|
||||||
|
"."
|
||||||
";"
|
";"
|
||||||
","
|
","
|
||||||
"::"
|
"::"
|
||||||
|
@ -121,6 +122,8 @@
|
||||||
(char_literal)
|
(char_literal)
|
||||||
] @string
|
] @string
|
||||||
|
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
[
|
[
|
||||||
(integer_literal)
|
(integer_literal)
|
||||||
(float_literal)
|
(float_literal)
|
||||||
|
@ -147,20 +150,16 @@
|
||||||
"&&"
|
"&&"
|
||||||
"*"
|
"*"
|
||||||
"*="
|
"*="
|
||||||
"*"
|
|
||||||
"+"
|
"+"
|
||||||
"+="
|
"+="
|
||||||
","
|
|
||||||
"-"
|
"-"
|
||||||
"-="
|
"-="
|
||||||
"->"
|
"->"
|
||||||
"."
|
|
||||||
".."
|
".."
|
||||||
"..="
|
"..="
|
||||||
"..."
|
"..."
|
||||||
"/="
|
"/="
|
||||||
":"
|
":"
|
||||||
";"
|
|
||||||
"<<"
|
"<<"
|
||||||
"<<="
|
"<<="
|
||||||
"<"
|
"<"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
(here_string)
|
(here_string)
|
||||||
(byte_string)] @string
|
(byte_string)] @string
|
||||||
(regex) @string.regex
|
(regex) @string.regex
|
||||||
(escape_sequence) @escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
[(comment)
|
[(comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
] @string.special.symbol
|
] @string.special.symbol
|
||||||
|
|
||||||
(regex) @string.regex
|
(regex) @string.regex
|
||||||
(escape_sequence) @escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
[
|
[
|
||||||
(integer)
|
(integer)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
(symbol) @variable
|
(symbol) @variable
|
||||||
(string) @string
|
(string) @string
|
||||||
|
|
||||||
(escape_sequence) @escape
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
[(comment)
|
[(comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue