constant identifiers and fix type declerations

This commit is contained in:
2026-07-11 07:17:40 +02:00
parent 1a495faec7
commit bb6a095b20
+14 -6
View File
@@ -18,15 +18,15 @@
{ {
"include": "#macros" "include": "#macros"
}, },
{
"include": "#type_declarations"
},
{ {
"include": "#impl" "include": "#impl"
}, },
{ {
"include": "#keywords" "include": "#keywords"
}, },
{
"include": "#type_declarations"
},
{ {
"include": "#numbers" "include": "#numbers"
}, },
@@ -261,7 +261,11 @@
"match": "\\b(struct|enum|class|trait|type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "match": "\\b(struct|enum|class|trait|type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
"captures": { "captures": {
"1": { "1": {
"name": "storage.type.mist" "patterns": [
{
"include": "#keywords"
}
]
}, },
"2": { "2": {
"name": "entity.name.type.mist" "name": "entity.name.type.mist"
@@ -353,7 +357,7 @@
}, },
{ {
"match": "\\b(constructor)\\b", "match": "\\b(constructor)\\b",
"name": "entity.name.function.constructor.mist" "name": "storage.type.constructor.mist"
} }
] ]
}, },
@@ -444,6 +448,10 @@
}, },
"include": "#operators" "include": "#operators"
}, },
{
"match": "\\b[A-Z][A-Z0-9_]*\\b",
"name": "constant.other.mist"
},
{ {
"match": "\\b[A-Z][A-Za-z0-9_]*\\b", "match": "\\b[A-Z][A-Za-z0-9_]*\\b",
"name": "entity.name.type.mist" "name": "entity.name.type.mist"
@@ -460,7 +468,7 @@
"name": "meta.import.mist" "name": "meta.import.mist"
}, },
"modules": { "modules": {
"match": "(?:pub\\s+)?\\bmodule\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;", "match": "\\bmodule\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s*;",
"captures": { "captures": {
"1": { "1": {
"name": "entity.name.namespace.module.mist" "name": "entity.name.namespace.module.mist"