From 3e3a8d056766665cfc5034aac20506bb5b988d07 Mon Sep 17 00:00:00 2001 From: abdussamedulutas Date: Wed, 24 Dec 2025 00:18:30 +0300 Subject: [PATCH] =?UTF-8?q?Renklendirme=20=C3=A7al=C4=B1=C5=9Fmalar=C4=B1n?= =?UTF-8?q?a=20ba=C5=9Fland=C4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saqut/language-configuration.json | 32 ++++++++ .vscode/extensions/saqut/package.json | 26 ++++++ .../saqut/snippets/saqut.code-snippets | 11 +++ .../saqut/syntaxes/saqut.tmLanguage.json | 81 +++++++++++++++++++ 4 files changed, 150 insertions(+) create mode 100644 .vscode/extensions/saqut/language-configuration.json create mode 100644 .vscode/extensions/saqut/package.json create mode 100644 .vscode/extensions/saqut/snippets/saqut.code-snippets create mode 100644 .vscode/extensions/saqut/syntaxes/saqut.tmLanguage.json diff --git a/.vscode/extensions/saqut/language-configuration.json b/.vscode/extensions/saqut/language-configuration.json new file mode 100644 index 0000000..f1d55c8 --- /dev/null +++ b/.vscode/extensions/saqut/language-configuration.json @@ -0,0 +1,32 @@ +{ + "comments": { + "lineComment": { + "comment": "//" + }, + "blockComment": ["/*", "*/"] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + { "open": "{", "close": "}" }, + { "open": "[", "close": "]" }, + { "open": "(", "close": ")" }, + { "open": "\"", "close": "\"" }, + { "open": "'", "close": "'" } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], + "indentationRules": { + "increaseIndentPattern": "^.*\\{\\s*$", + "decreaseIndentPattern": "^\\s*\\}.*$" + }, + "wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)" +} \ No newline at end of file diff --git a/.vscode/extensions/saqut/package.json b/.vscode/extensions/saqut/package.json new file mode 100644 index 0000000..26959ff --- /dev/null +++ b/.vscode/extensions/saqut/package.json @@ -0,0 +1,26 @@ +{ + "name": "saqut-support", + "displayName": "saQut Language Support", + "version": "0.1.0", + "engines": { "vscode": "^1.60.0" }, + "categories": ["Programming Languages"], + "contributes": { + "languages": [{ + "id": "saqut", + "aliases": ["saQut", "saqut"], + "extensions": [".sqt"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "saqut", + "scopeName": "source.sqt", + "path": "./syntaxes/saqut.tmLanguage.json" + }], + "snippets": [ + { + "language": "saqut", + "path": "./snippets/saqut.code-snippets" + } + ] + } +} \ No newline at end of file diff --git a/.vscode/extensions/saqut/snippets/saqut.code-snippets b/.vscode/extensions/saqut/snippets/saqut.code-snippets new file mode 100644 index 0000000..40daaaf --- /dev/null +++ b/.vscode/extensions/saqut/snippets/saqut.code-snippets @@ -0,0 +1,11 @@ +{ + "If Statement": { + "prefix": "if", + "body": [ + "if (${1:condition}) {", + "\t$0", + "}" + ], + "description": "If Koşulu" + } +} \ No newline at end of file diff --git a/.vscode/extensions/saqut/syntaxes/saqut.tmLanguage.json b/.vscode/extensions/saqut/syntaxes/saqut.tmLanguage.json new file mode 100644 index 0000000..6c44e98 --- /dev/null +++ b/.vscode/extensions/saqut/syntaxes/saqut.tmLanguage.json @@ -0,0 +1,81 @@ +{ + "scopeName": "source.sqt", + "patterns": [ + { "include": "#comments" }, + { "include": "#keywords" }, + { "include": "#classes" }, + { "include": "#structs" }, + { "include": "#enums" }, + { "include": "#strings" }, + { "include": "#numbers" }, + { "include": "#functions" } + ], + "repository": { + "keywords": { + "patterns": [{ + "name": "keyword.control.saqut", + "match": "\\b(if|else|while|do|for|foreach|return|break|continue|switch|case|default)\\b" + }, { + "name": "storage.type.saqut", + "match": "\\b(int|float|double|string|bool|void|var|class|struct|enum|public|private|static|readonly|const)\\b" + }, { + "name": "variable.language.saqut", + "match": "\\b(this)\\b" + }, { + "name": "constant.language.saqut", + "match": "\\b(true|false|null)\\b" + }] + }, + "functions": { + "patterns": [{ + "name": "entity.name.function.saqut", + "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)(?=\\s*\\()" + }] + }, + "classes": { + "patterns": [{ + "match": "\\b(class)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "captures": { + "1": { "name": "storage.type.saqut" }, + "2": { "name": "entity.name.class" } + } + }] + }, + "structs": { + "patterns": [{ + "match": "\\b(struct)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "captures": { + "1": { "name": "storage.type.saqut" }, + "2": { "name": "entity.name.struct" } + } + }] + }, + "enums": { + "patterns": [{ + "match": "\\b(enum)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "captures": { + "1": { "name": "storage.type.saqut" }, + "2": { "name": "entity.name.enum" } + } + }] + }, + "strings": { + "name": "string.quoted.double.saqut", + "begin": "\"", + "end": "\"", + "patterns": [ + { "name": "constant.character.escape.saqut", "match": "\\\\." } + ] + }, + "numbers": { + "name": "constant.numeric.saqut", + "match": "\\b(0x[0-9a-fA-F]+|[0-9]+(\\.[0-9]+)?)\\b" + }, + "comments": { + "patterns": [ + { "name": "comment.line.double-slash.saqut", "match": "//.*$" }, + { "name": "comment.block.saqut", "begin": "/\\*", "end": "\\*/" } + ] + } + } +} \ No newline at end of file