From 20dc9b8a9a576f1bf4ecad06b4c4221ae46ab8da Mon Sep 17 00:00:00 2001 From: Pine Wu Date: Tue, 16 Jan 2024 06:03:57 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96:=20update=20grammars?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/shiki/languages/kotlin.tmLanguage.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/shiki/languages/kotlin.tmLanguage.json b/packages/shiki/languages/kotlin.tmLanguage.json index 304b2af5e..b1523f7ee 100644 --- a/packages/shiki/languages/kotlin.tmLanguage.json +++ b/packages/shiki/languages/kotlin.tmLanguage.json @@ -75,13 +75,13 @@ "include": "#class-declaration" }, { - "include": "#object-declaration" + "include": "#object" }, { "include": "#type-alias" }, { - "include": "#function-declaration" + "include": "#function" }, { "include": "#variable-declaration" @@ -317,8 +317,8 @@ } } }, - "object-declaration": { - "match": "\\b(object)\\s+(\\b\\w+\\b|`[^`]+`)", + "object": { + "match": "\\b(object)(?:\\s+(\\b\\w+\\b|`[^`]+`))?", "captures": { "1": { "name": "storage.type.object.kotlin" @@ -346,8 +346,8 @@ } } }, - "function-declaration": { - "match": "\\b(fun)\\b\\s*(?<([^<>]|\\g)+>)?\\s*(?:(\\w+)\\.)?(\\b\\w+\\b|`[^`]+`)", + "function": { + "match": "\\b(fun)\\b\\s*(?<([^<>]|\\g)+>)?\\s*(?:(?:(\\w+)\\.)?(\\b\\w+\\b|`[^`]+`))?", "captures": { "1": { "name": "storage.type.function.kotlin"