Skip to content

Commit 1bcf723

Browse files
committed
colors for name and type
1 parent d10fcd5 commit 1bcf723

File tree

1 file changed

+34
-16
lines changed

1 file changed

+34
-16
lines changed

syntaxes/delphi.tmLanguage.json

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"include": "#keywords"
1313
},
1414
{
15-
"include": "#strings"
15+
"include": "#entities"
1616
},
1717
{
1818
"include": "#constants"
@@ -25,24 +25,42 @@
2525
"match": "\\b(object|end)\\b"
2626
}]
2727
},
28-
"strings": {
29-
"name": "string.quoted.single.dfm",
30-
"begin": "'",
31-
"end": "'",
28+
"constants": {
3229
"patterns": [
33-
30+
{
31+
"name": "constant.numeric.dfm",
32+
"match": "\\W\\d+"
33+
},
34+
{
35+
"name": "constant.language.dfm",
36+
"match": "\\b([Tt]rue|[Ff]alse)\\b"
37+
},
38+
{
39+
"name": "string.quoted.single.dfm",
40+
"begin": "'",
41+
"end": "'",
42+
"patterns": [
43+
{
44+
"match": ".*"
45+
}
46+
]
47+
}
3448
]
3549
},
36-
"constants": {
37-
"patterns": [{
38-
"name": "constant.numeric.dfm",
39-
"match": "\\W\\d+"
40-
},
41-
{
42-
"name": "constant.language.dfm",
43-
"match": "([Tt]rue|[Ff]alse)"
44-
}
45-
]
50+
"entities": {
51+
"patterns": [
52+
{
53+
"match": "(\\w+):\\s+(\\w+)",
54+
"captures": {
55+
"1": {
56+
"name": "variable.parameter.dfm"
57+
},
58+
"2": {
59+
"name": "entity.name.type.dfm"
60+
}
61+
}
62+
}
63+
]
4664
}
4765
},
4866
"scopeName": "source.dfm"

0 commit comments

Comments
 (0)