From e68bff09273f72c2e2e2a3c3c812a6d82a4b6039 Mon Sep 17 00:00:00 2001 From: chakr Date: Sun, 4 Sep 2022 00:36:31 -0400 Subject: [PATCH] first commit --- .gitattributes | 3 ++ .gitignore | 2 + .vscode/launch.json | 17 +++++++ .vscodeignore | 4 ++ CHANGELOG.md | 9 ++++ README.md | 3 ++ language-configuration.json | 29 ++++++++++++ package.json | 25 +++++++++++ syntaxes/varaq.tmLanguage.json | 82 ++++++++++++++++++++++++++++++++++ 9 files changed, 174 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 README.md create mode 100644 language-configuration.json create mode 100644 package.json create mode 100644 syntaxes/varaq.tmLanguage.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..13bc9c2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# 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..04541cc --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + +All notable changes to the "varaq-lang" extension will be documented in this file. + +Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. + +## [Unreleased] + +- Initial release \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a9c858 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# varaq-lang + +Simple syntax highighting for the var'aq programming language \ No newline at end of file diff --git a/language-configuration.json b/language-configuration.json new file mode 100644 index 0000000..775d799 --- /dev/null +++ b/language-configuration.json @@ -0,0 +1,29 @@ +{ + "comments": { + // symbols used for start and end a block comment. Remove this entry if your language does not support block comments + "blockComment": [ "(*", "*)" ] + }, + // symbols used as brackets + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + // symbols that are auto closed when typing + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["(*", "*)"], + ["\"", "\""], + ["'", "'"] + ], + // symbols that can be used to surround a selection + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["'", "'"] + ], +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..272c6fc --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "varaq-lang", + "displayName": "varaq-lang", + "description": "Syntax for the var'aq programming language", + "version": "0.0.1", + "engines": { + "vscode": "^1.67.0" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "languages": [{ + "id": "varaq", + "aliases": ["var'aq", "varaq"], + "extensions": [".vq",".vqe",".vql",".vqx"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "varaq", + "scopeName": "source.varaq", + "path": "./syntaxes/varaq.tmLanguage.json" + }] + } +} \ No newline at end of file diff --git a/syntaxes/varaq.tmLanguage.json b/syntaxes/varaq.tmLanguage.json new file mode 100644 index 0000000..deeb24a --- /dev/null +++ b/syntaxes/varaq.tmLanguage.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "var'aq", + "patterns": [ + { + "include": "#keywords" + }, + { + "include": "#strings" + }, + { + "include": "#comments" + }, + { + "include": "#numbers" + }, + { + "include": "#import" + } + ], + "repository": { + "keywords": { + "patterns": [{ + "name": "keyword.control.varaq", + "match": "\\b(and|atan|add|bep|complain|compl|compose|contradict|cons|cos|chImmoH|cher|boq|choose|chov|chuv|clear|dup|dump|disp|div|DuD|e|exch|eval|escape|explode|forget|ghap|ghurtaH|Hotlh|Habwav|idiv|isolate|ifyes|ifno|je|jor|joq|ln|listen|loS'ar|log|log3|latlh|law'moH|law'qa'moH|maHghurtaH|mix|mi'moH|muv|mul|mod|mobmoH|mIScher|mIS|nIHghoS|name|nargh|naQmoH|numberize|or|pi|pagh'a'|pop|pong|pow|poSghoS|puS'a'|puSrap'a'|qaw|qawHa'|qojmI'|qojHa'|Qo'moH|remember|repeat|rand|rap'a'|rapbe'a'|set|split|shatter|strcut|strmeasure|strtie|tlheghrar|sub|sub1|sqrt|sin|clip|poD|smooth|Hab|howmuch|'ar|setrand|shiftright|shiftleft|SIj|teq|tam|tan|taH'a'|tlhoch|tlheghpe'|tlheghjuv|vangqa'|wIv|woD|wav|wa'teq|wa'chel|wejghurtaH|xor|'Ij|time|poH|lI'moH|gc|whereami|version|newline|tab|argv|nuqDaq_jIH|chu'tut)\\b" + }, + { + "name": "keyword.operator", + "match": "le\\?|lt\\?|empty\\?|eq\\?|gt\\?|ge\\?|int\\?|ne\\?|negative\\?|number\\?|null\\?|streq\\?" + }, + { + "name": "keyword.other", + "match": "chIm'a'|cha'|ghurmI'|ghobe'chugh|ghorqu'|HeHmI'|HabmI''a'|HIja'chugh|law''a'|law'rap'a'|mI''a'|pagh'a'|puS'a'|puSrap'a'|qawHa'|qojmI'|qojHa'|rap'a'|rapbe'a'|'ar|taH'a'|tlheghpe'|tlhreghrap'a'|vangqa'|tlheghrap'a'|'Ij|yu'eghHa'|woDHa'|taghDe'|pongmI'|chu'DonwI'|boq'egh" + }, + { + "name":"keyword.operator.new", + "match": "~" + }] + }, + "strings": { + "name": "string.quoted.double.varaq", + "begin": "\"", + "end": "\"", + "patterns": [ + { + "name": "constant.character.escape.varaq", + "match": "\\\\." + } + ] + }, + "comments": { + "name": "comment.quoted.double.varaq", + "begin": "\\(\\*", + "end": "\\*\\)", + "patterns": [ + { + "name": "constant.character.escape.varaq", + "match": "\\\\." + } + ] + }, + "numbers":{ + "name": "constant.numeric", + "patterns":[ + { + "name":"constant.numeric.varaq", + "match":"\\d" + } + ] + }, + "import": { + "name": "meta.preprocessor", + "patterns":[ + { + "name":"meta.preprocessor.varaq", + "match":"\/\/.+\n" + } + ] + } + }, + "scopeName": "source.varaq" +}