From 6053cf25946c8e93a41efc46b71c59801ee6c84c Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Sun, 28 Jun 2026 22:23:31 +0200 Subject: [PATCH] Update: syntax highlighting --- public/mist.tmLanguage.json | 98 +++++++++++++++++++++++++++---------- 1 file changed, 73 insertions(+), 25 deletions(-) diff --git a/public/mist.tmLanguage.json b/public/mist.tmLanguage.json index 43a0581..5aa3f27 100644 --- a/public/mist.tmLanguage.json +++ b/public/mist.tmLanguage.json @@ -33,9 +33,6 @@ { "include": "#types" }, - { - "include": "#namespaces" - }, { "include": "#imports" }, @@ -45,6 +42,9 @@ { "include": "#struct_literals" }, + { + "include": "#impl" + }, { "include": "#method_calls" }, @@ -212,12 +212,19 @@ } }, { - "match": "\\b(fn)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "match": "\\b(fn)\\s+([a-zA-Z_][a-zA-Z0-9_]*)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", "captures": { "1": { "name": "storage.type.mist" }, "2": { + "patterns": [ + { + "include": "#types" + } + ] + }, + "3": { "name": "entity.name.function.mist" } } @@ -227,7 +234,7 @@ "keywords": { "patterns": [ { - "match": "\\b(if|else|while|for|return|break|continue|match|loop)\\b", + "match": "\\b(if|else|while|for|return|break|continue|match|loop|in)\\b", "name": "keyword.control.mist" }, { @@ -235,7 +242,7 @@ "name": "storage.modifier.mist" }, { - "match": "\\b(pub|mut|use|mod|as|dyn|unsafe|self|super|Super|constructor|override)\\b", + "match": "\\b(pub|mut|use|module|as|dyn|unsafe|self|super|Super|constructor|override)\\b", "name": "keyword.other.mist" }, { @@ -316,38 +323,38 @@ "types": { "patterns": [ { - "match": "(?>=|<<|>>|\\.\\.=|\\.\\.|<=|>=|==|!=|&&|\\|\\||[+\\-*/%<>&|^=!]|\\+\\+|--)", + "match": "(?:\\+=|-=|\\*=|\\/=|%=|&=|\\|=|\\^=|<<=|>>=|<<|>>|\\.\\.=|\\.\\.|<=|>=|==|!=|&&|\\|\\||[+\\-*/%<>&|^=!]|\\+\\+|--|:)", "name": "keyword.operator.mist" } ]