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:
@@ -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": [
|
||||
{
|
||||
@@ -151,4 +179,4 @@
|
||||
}
|
||||
},
|
||||
"scopeName": "source.def"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user