From 7f6f528b602bdcc3201a9967c9219b8cfcd879ef Mon Sep 17 00:00:00 2001 From: Armando Andini Date: Mon, 13 Mar 2023 14:39:00 -0300 Subject: [PATCH] chore: highlight user-defined value types --- client/syntaxes/solidity.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/client/syntaxes/solidity.json b/client/syntaxes/solidity.json index 0f7efa42..5847337d 100644 --- a/client/syntaxes/solidity.json +++ b/client/syntaxes/solidity.json @@ -5,6 +5,9 @@ { "include": "#natspec" }, + { + "include": "#declaration-userType" + }, { "include": "#comment" }, @@ -569,6 +572,9 @@ { "include": "#declaration-contract" }, + { + "include": "#declaration-userType" + }, { "include": "#declaration-interface" }, @@ -687,6 +693,20 @@ } ] }, + "declaration-userType": { + "match": "\\b(type)\\b\\s+(\\w+)\\b\\s+\\b(is)\\b", + "captures": { + "1": { + "name": "storage.type.userType" + }, + "2": { + "name": "entity.name.type.userType" + }, + "3": { + "name": "storage.modifier.is" + } + } + }, "declaration-interface": { "patterns": [ {