From bb6a095b204130cba1104352a963329b7449b1f0 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Sat, 11 Jul 2026 07:17:40 +0200 Subject: [PATCH] constant identifiers and fix type declerations --- syntaxes/mist.tmLanguage.json | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/syntaxes/mist.tmLanguage.json b/syntaxes/mist.tmLanguage.json index 70823bb..f8c28de 100644 --- a/syntaxes/mist.tmLanguage.json +++ b/syntaxes/mist.tmLanguage.json @@ -18,15 +18,15 @@ { "include": "#macros" }, - { - "include": "#type_declarations" - }, { "include": "#impl" }, { "include": "#keywords" }, + { + "include": "#type_declarations" + }, { "include": "#numbers" }, @@ -261,7 +261,11 @@ "match": "\\b(struct|enum|class|trait|type)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "captures": { "1": { - "name": "storage.type.mist" + "patterns": [ + { + "include": "#keywords" + } + ] }, "2": { "name": "entity.name.type.mist" @@ -353,7 +357,7 @@ }, { "match": "\\b(constructor)\\b", - "name": "entity.name.function.constructor.mist" + "name": "storage.type.constructor.mist" } ] }, @@ -444,6 +448,10 @@ }, "include": "#operators" }, + { + "match": "\\b[A-Z][A-Z0-9_]*\\b", + "name": "constant.other.mist" + }, { "match": "\\b[A-Z][A-Za-z0-9_]*\\b", "name": "entity.name.type.mist" @@ -460,7 +468,7 @@ "name": "meta.import.mist" }, "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": { "1": { "name": "entity.name.namespace.module.mist"