From b67e6f481d2f581615f2c92ce820f007468f20c1 Mon Sep 17 00:00:00 2001 From: Artemy Date: Fri, 29 Dec 2023 12:32:43 +0300 Subject: [PATCH] feat: basic syntax highlighting --- .gitattributes | 2 + .gitignore | 2 + .vscode/launch.json | 17 +++ .vscodeignore | 4 + CHANGELOG.md | 11 ++ LICENSE | 21 +++ README.md | 7 + icon.png | Bin 0 -> 10245 bytes language-configuration.json | 32 ++++ package.json | 41 ++++++ syntaxes/symboscript.tmLanguage.json | 210 +++++++++++++++++++++++++++ 11 files changed, 347 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .vscode/launch.json create mode 100644 .vscodeignore create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 icon.png create mode 100644 language-configuration.json create mode 100644 package.json create mode 100644 syntaxes/symboscript.tmLanguage.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..70e63ff --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Set default behavior to automatically normalize line endings. +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..67dfeb3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +*.vsix \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..0e191b5 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +// A launch configuration that launches the extension inside a new window +// Use IntelliSense to learn about possible attributes. +// Hover to view descriptions of existing attributes. +// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}" + ] + } + ] +} \ No newline at end of file diff --git a/.vscodeignore b/.vscodeignore new file mode 100644 index 0000000..f369b5e --- /dev/null +++ b/.vscodeignore @@ -0,0 +1,4 @@ +.vscode/** +.vscode-test/** +.gitignore +vsc-extension-quickstart.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1e921f9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Change Log + +All notable changes to the "symboscript-vs" extension will be documented in this file. + +## [Unreleased] + +- Nothing + +## [0.1.0] - 2023-12-29 + +- Initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4e906a4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Artemy Egorov (artegoser) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..243abc4 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# symboscript-vs README + +This extension adds support for the [Symboscript](https://github.com/symboscript/symboscript) programming language to VS Code. + +## Features + +- Syntax highlighting diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..37c940f6517cbe3fb5d1a7a44aef95f4ce678ff3 GIT binary patch literal 10245 zcmeHtc|4Tg_xNK=k)?#n78OYdA-j^iWzQai$j-<*nK71x?3Eb%nteAh#xPWtH1=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!lSz`z0H;uQtUTi>0jo=#@Q=`>1PMV_Dcj_8fPA6z+r@B-u z^p`ZRfbvHF{Tpg@z_*~yPOkX&)@wtMphUftn2W$&+flMsiU!mTwt;He+0){nvD|E! zcQn0Df?DPqt?vyWn_e@8M@$zfbJ)O6erZvTbm@U;*W_i@)hkQLdg|KLClEM8n730XR3U$aI6#GtwGKVLo+qG7<`M!)&mqQ;D zWaek8Ab?dZvnV8FF$;I}rI;SxGf=fl^`ZwXqzz3m$Aqw^RUv!jA&3jD%w+?8PnWiG zRyjF0J;c_%wk+AR|D4o>&1b-pKA9ra!tCCpkvxxL?bNr`+{S_uA-LcvW%+M;J63H~~#Jml#j(3J22-3+9>64VGvj)RgxpY2JfDwpo+pJs}@>|!)(?!=)" + }, + { + "comment": "assignment operators", + "name": "keyword.operator.assignment.symboscript", + "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&=|\\|=|<<=|>>=)" + }, + { + "comment": "single equal", + "name": "keyword.operator.assignment.equal.symboscript", + "match": "(?])=(?!=|>)" + }, + { + "comment": "comparison operators", + "name": "keyword.operator.comparison.symboscript", + "match": "(=(=)?(?!>)|!=|<=|(?=)" + }, + { + "comment": "math operators", + "name": "keyword.operator.math.symboscript", + "match": "(\\^|([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))" + }, + { + "comment": "range operator", + "name": "keyword.operator.range.symboscript", + "match": "\\.\\." + }, + { + "comment": "dot expr access", + "name": "keyword.operator.access.dot.expr.symboscript", + "match": "\\.[^\\w]" + }, + { + "comment": "dot access", + "name": "keyword.operator.access.dot.symboscript", + "match": "\\." + } + ] + }, + + "punctuation": { + "patterns": [ + { + "comment": "comma", + "name": "punctuation.comma.symboscript", + "match": "," + }, + { + "comment": "curly braces", + "name": "punctuation.brackets.curly.symboscript", + "match": "[{}]" + }, + { + "comment": "parentheses, round brackets", + "name": "punctuation.brackets.round.symboscript", + "match": "[()]" + }, + { + "comment": "semicolon", + "name": "punctuation.semi.symboscript", + "match": ";" + }, + { + "comment": "square brackets", + "name": "punctuation.brackets.square.symboscript", + "match": "[\\[\\]]" + } + ] + }, + + "string": { + "comment": "Strings", + "patterns": [ + { + "name": "string.quoted.double.symboscript", + "begin": "\"", + "end": "\"", + "patterns": [{ "include": "#escape" }] + }, + { + "name": "string.quoted.single.symboscript", + "begin": "'", + "end": "'", + "patterns": [{ "include": "#escape" }] + }, + { + "name": "string.quoted.other.symboscript", + "begin": "`", + "end": "`", + "patterns": [{ "include": "#escape" }] + } + ] + }, + + "escape": { + "name": "constant.character.escape.symboscript", + "match": "\\\\." + }, + + "variables": { + "patterns": [ + { + "comment": "variables", + "name": "variable.other.symboscript", + "match": "[a-z][a-z0-9_]*", + "captures": { + "1": { + "name": "constant.numeric.symboscript" + } + } + } + ] + } + } +}