From 9b768281244cc9e9ee6475a30c9b4d6c04466ce5 Mon Sep 17 00:00:00 2001 From: Maryna Balioura Date: Sun, 15 Jun 2025 18:53:03 +0200 Subject: [PATCH] syntaxes: adds support for `FUNCTION` in node relations --- syntaxes/sdoc.tmLanguage.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/syntaxes/sdoc.tmLanguage.json b/syntaxes/sdoc.tmLanguage.json index 30a2886..5fdb8f2 100644 --- a/syntaxes/sdoc.tmLanguage.json +++ b/syntaxes/sdoc.tmLanguage.json @@ -788,6 +788,9 @@ { "include": "#node_relation_role" }, + { + "include": "#node_relation_function" + }, { "include": "#node_relation_params_names" } @@ -822,6 +825,18 @@ } ] }, + "node_relation_function": { + "patterns": [ + { + "name": "keyword.control.sdoc", + "match": "(^\\s\\sFUNCTION:)\\s\\b(\\S+)\\b$", + "captures": { + "1": { "name": "keyword.control.sdoc" }, + "2": { "name": "string.unquoted.sdoc" } + } + } + ] + }, "node_relation_role": { "patterns": [ { @@ -837,7 +852,7 @@ "node_relation_params_names": { "comment": "Used to highlight fields that have not yet been filled in correctly", "patterns": [{ - "match": "^(-\\sTYPE|\\s\\sVALUE|\\s\\sROLE):\\s", + "match": "^(-\\sTYPE|\\s\\sVALUE|\\s\\sROLE|\\s\\sFUNCTION):\\s", "name": "keyword.other.sdoc" }] },