feat(syntax): add escaped-quoted-strings token to def syntax

Introduces an escaped-quoted-strings pattern for the def syntax.
It enables proper highlighting of strings with escapes and vars.
The change adds the new pattern to the syntax and fixes the EOF newline.

- Adds escaped-quoted-strings for escapes and embedded vars
- Registers new pattern in repository for proper highlighting
- Ensures trailing newline in the file
This commit is contained in:
Christoph Brandau
2026-09-04 08:39:46 +02:00
parent af5acfc946
commit 26225eb8ed
+28
View File
@@ -5,6 +5,9 @@
{
"include": "#comment"
},
{
"include": "#escaped-quoted-strings"
},
{
"include": "#strings"
},
@@ -28,6 +31,31 @@
}
],
"repository": {
"escaped-quoted-strings": {
"name": "string.quoted.double.def",
"begin": "\\\\\"",
"end": "\\\\\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.def"
}
},
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.def"
}
},
"patterns": [
{
"name": "constant.character.escape.def",
"match": "\\\\."
},
{
"name": "variable.other.property",
"match": "\\$[_a-zA-Z][_a-zA-Z0-9]*(\\(\\$?[_a-zA-Z][_a-zA-Z0-9]*(,\\$?[_a-zA-Z][_a-zA-Z0-9]*)*\\))?"
}
]
},
"keywords": {
"patterns": [
{