diff --git a/.github/workflows/level-check.yml b/.github/workflows/level-check.yml index 773a0a8..c920d5a 100644 --- a/.github/workflows/level-check.yml +++ b/.github/workflows/level-check.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.6 + - name: Set up Python 3.8 uses: actions/setup-python@v3 with: - python-version: "3.7" + python-version: "3.8" - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.gitignore b/.gitignore index 2058403..e789b4f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.egg-info/** -**/__pycache__/** \ No newline at end of file +**/__pycache__/** +.idea/** \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..35aa85b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,53 @@ +{ + "workbench.colorCustomizations": { + "editor.foreground": "#8ac7ff" + }, + + "editor.tokenColorCustomizations": { + "textMateRules": [ + { + "scope": "comment.line.level", + "settings": { + "foreground": "#6A9955" + } + }, + { + "scope": "keyword.control.level", + "settings": { + "foreground": "#ffffff", + "fontStyle": "bold" + } + }, + { + "scope": "storage.type.level", + "settings": { + "foreground": "#4EC9B0" + } + }, + { + "scope": "entity.name.function.level", + "settings": { + "foreground": "#e8f09f" + } + }, + { + "scope": "constant.numeric.level", + "settings": { + "foreground": "#dfdfdf" + } + }, + { + "scope": "punctuation.section.lvl", + "settings": { + "foreground": "#D4D4D4" + } + }, + { + "scope": "keyword.operator.level", + "settings": { + "foreground": "#f8f1b4", + "fontStyle": "bold" + } + } + ] +}} diff --git a/level/__init__.py b/level/__init__.py index ecbe8ad..8b11e27 100644 --- a/level/__init__.py +++ b/level/__init__.py @@ -1 +1 @@ -__version__ = "v0.5.6a" +__version__ = "v0.5.7a" diff --git a/vc-extension/level-highlight/.vscode/launch.json b/vc-extension/level-highlight/.vscode/launch.json new file mode 100644 index 0000000..44a86ab --- /dev/null +++ b/vc-extension/level-highlight/.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}" + ] + } + ] +} diff --git a/vc-extension/level-highlight/.vscodeignore b/vc-extension/level-highlight/.vscodeignore new file mode 100644 index 0000000..f369b5e --- /dev/null +++ b/vc-extension/level-highlight/.vscodeignore @@ -0,0 +1,4 @@ +.vscode/** +.vscode-test/** +.gitignore +vsc-extension-quickstart.md diff --git a/vc-extension/level-highlight/language-configuration.json b/vc-extension/level-highlight/language-configuration.json new file mode 100644 index 0000000..8f162a0 --- /dev/null +++ b/vc-extension/level-highlight/language-configuration.json @@ -0,0 +1,30 @@ +{ + "comments": { + // symbol used for single line comment. Remove this entry if your language does not support line comments + "lineComment": "//", + // 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/vc-extension/level-highlight/package.json b/vc-extension/level-highlight/package.json new file mode 100644 index 0000000..ce994fe --- /dev/null +++ b/vc-extension/level-highlight/package.json @@ -0,0 +1,25 @@ +{ + "name": "level-highlight", + "displayName": "Level Highlight", + "description": "", + "version": "0.0.1", + "engines": { + "vscode": "^1.96.0" + }, + "categories": [ + "Programming Languages" + ], + "contributes": { + "languages": [{ + "id": "level", + "aliases": ["Level", "level"], + "extensions": [".lvl"], + "configuration": "./language-configuration.json" + }], + "grammars": [{ + "language": "level", + "scopeName": "source.level", + "path": "./syntaxes/level.tmLanguage.json" + }] + } +} diff --git a/vc-extension/level-highlight/syntaxes/level.tmLanguage.json b/vc-extension/level-highlight/syntaxes/level.tmLanguage.json new file mode 100644 index 0000000..c856c97 --- /dev/null +++ b/vc-extension/level-highlight/syntaxes/level.tmLanguage.json @@ -0,0 +1,43 @@ +{ + "name": "Level", + "scopeName": "source.level", + "patterns": [ + { + "match": "(sub|method)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "captures": { + "1": + { + "name": "keyword.control.level" + }, + "2": { + "name": "entity.name.function.level" + } + } + }, + { + "name": "comment.line.number-sign.level", + "match": "#.*$" + }, + { + "name": "string.quoted.level", + "match": "\"([^\"\\\\]|\\\\.)*\"|'([^'\\\\]|\\\\.)*'" + }, + { + "name": "constant.numeric.level", + "match": "\\b(?:0x[0-9A-Fa-f]+|\\d+\\.?\\d*)\\b" + }, + { + "name": "keyword.control.level", + "match": "\\b(?:as|break|continue|dec|def|del|direct|echo|else|entry|exec|extends|finish|for|foreach|global|if|import|in|inc|inline|metal|method|mutable|new|return|sizeof|sub|type|typeid|var|while|with)\\b" + }, + { + "name": "storage.type.level", + "match": "\\b(?:array|bool|byte|false|float|i32|i64|int|uint|null|object|rec|ref|swap|true|u32|u64|val)\\b" + }, + { + "name": "keyword.operator.level", + "match": "\\b(?:abs|and|ceil|cos|cot|exp|floor|log|log10|log2|not|or|pow|pow10|pow2|round|sgn|shift|sin|sqrt|tan)\\b|\\!|\\$=|%|&|\\*|\\+|-|/|<|<-|<<|=|>|>>|\\^|\\||~" + } + ], + "repository": {} +} diff --git a/vc-extension/level-highlight/vsc-extension-quickstart.md b/vc-extension/level-highlight/vsc-extension-quickstart.md new file mode 100644 index 0000000..cd1ce7c --- /dev/null +++ b/vc-extension/level-highlight/vsc-extension-quickstart.md @@ -0,0 +1,29 @@ +# Welcome to your VS Code Extension + +## What's in the folder + +* This folder contains all of the files necessary for your extension. +* `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. +* `syntaxes/level.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization. +* `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. + +## Get up and running straight away + +* Make sure the language configuration settings in `language-configuration.json` are accurate. +* Press `F5` to open a new window with your extension loaded. +* Create a new file with a file name suffix matching your language. +* Verify that syntax highlighting works and that the language configuration settings are working. + +## Make changes + +* You can relaunch the extension from the debug toolbar after making changes to the files listed above. +* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. + +## Add more language features + +* To add features such as IntelliSense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs + +## Install your extension + +* To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. +* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.