From adf03d86f75ad5519549896e1bc1a1822cd61d09 Mon Sep 17 00:00:00 2001 From: meloalright Date: Sun, 12 Nov 2023 01:58:48 +0800 Subject: [PATCH] Update all the keywords in language server --- syntaxes/3body.tmLanguage.json | 58 ++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/syntaxes/3body.tmLanguage.json b/syntaxes/3body.tmLanguage.json index 3ff8e36..0fdf35c 100644 --- a/syntaxes/3body.tmLanguage.json +++ b/syntaxes/3body.tmLanguage.json @@ -4,24 +4,34 @@ "repository": { "keywords": { "patterns": [{ - "name": "keyword.control.3body", - "match": "\\b(if|while|for|return)\\b" + "name": "keyword.control.basic", + "match": "\\b(if|else|return)\\b" + }, { + "name": "keyword.reserved.basic", + "match": "\\b(let)\\b" + }, { + "name": "keyword.opeator.basic", + "match": "\\b(>|<|==)\\b" }] }, - "strings": { - "name": "string.quoted.double.3body", - "begin": "\"", - "end": "\"", + "operators": { "patterns": [ { - "name": "constant.character.escape.3body", - "match": "\\\\." + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.basic" + }, + { + "match": "%|\\*|/|-|\\+|前进|降维", + "name": "keyword.operator.basic" } ] } }, "scopeName": "text.3body.basic", "patterns": [ + { + "include": "#keywords" + }, { "begin": "\"", "beginCaptures": { @@ -38,9 +48,36 @@ "name": "string.quoted.double.3body" }, { - "match": "(面壁|破壁|延绪)", + "match": "\\b(面壁|破壁|延绪)\\b", "name": "keyword.control.3body" }, + { + "match": "\\b(给|思想钢印|法则)\\b", + "name": "keyword.reserved.3body" + }, + { + "match": "\\b(这是计划的一部分)\\b", + "name": "constant.language.boolean.true.3body" + }, + { + "match": "\\b(主不在乎)\\b", + "name": "constant.language.boolean.false.3body" + }, + { + "match": "\\b(广播|冬眠|二向箔清理|毁灭|没关系的都一样)\\b", + "name": "support.function.builtin.coffee" + }, + { + "match": "([\u4e00-\u9fa5_a-zA-Z0-9$_][\\w$]*)?\\s*(=|以)", + "captures": { + "1": { + "name": "variable.assignment.3body" + }, + "2": { + "name": "keyword.operator.assignment.3body" + } + } + }, { "begin": "//", "beginCaptures": { @@ -50,6 +87,9 @@ }, "end": "$", "name": "comment.line.number-sign.3body" + }, + { + "include": "#operators" } ] } \ No newline at end of file