From 0b412cda2d9debb363cc433bb47a6ce7b7511344 Mon Sep 17 00:00:00 2001 From: Klesti Selimaj Date: Wed, 13 May 2026 07:02:04 +0200 Subject: [PATCH] Working syntax --- syntaxes/mist.tmLanguage.json | 106 ++++++++++++++++++++++++++++++++-- 1 file changed, 102 insertions(+), 4 deletions(-) diff --git a/syntaxes/mist.tmLanguage.json b/syntaxes/mist.tmLanguage.json index 978d1d8..feccb82 100644 --- a/syntaxes/mist.tmLanguage.json +++ b/syntaxes/mist.tmLanguage.json @@ -149,12 +149,110 @@ "types": { "patterns": [ { - "name": "entity.name.type.primitive.mist", - "match": "\\b(bool|char|str)\\b" + "comment": "numeric types", + "match": "(?", + "endCaptures": { + "0": { + "name": "punctuation.brackets.angle.mist" + } + }, + "patterns": [ + { + "include": "#block-comments" + }, + { + "include": "#comments" + }, + { + "include": "#keywords" + }, + { + "include": "#variables" + }, + { + "include": "#lifetimes" + }, + { + "include": "#punctuation" + }, + { + "include": "#types" + }, + { + "include": "#variables" + } + ] + }, + { + "comment": "trait declarations", + "match": "\\b(trait)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.trait.mist storage.type.mist" + }, + "2": { + "name": "entity.name.type.trait.mist" + } + } + }, + { + "comment": "struct declarations", + "match": "\\b(struct)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.struct.mist storage.type.mist" + }, + "2": { + "name": "entity.name.type.struct.mist" + } + } + }, + { + "comment": "enum declarations", + "match": "\\b(enum)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.enum.mist storage.type.mist" + }, + "2": { + "name": "entity.name.type.enum.mist" + } + } + }, + { + "comment": "type declarations", + "match": "\\b(type)\\s+(_?[A-Z][A-Za-z0-9_]*)\\b", + "captures": { + "1": { + "name": "keyword.declaration.type.mist storage.type.mist" + }, + "2": { + "name": "entity.name.type.declaration.mist" + } + } + }, + { + "comment": "types", + "name": "entity.name.type.mist", + "match": "\\b_?[A-Z][A-Za-z0-9_]*\\b(?!!)" } ] },