Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/level-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.egg-info/**
**/__pycache__/**
**/__pycache__/**
.idea/**
53 changes: 53 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}}
2 changes: 1 addition & 1 deletion level/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "v0.5.6a"
__version__ = "v0.5.7a"
17 changes: 17 additions & 0 deletions vc-extension/level-highlight/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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}"
]
}
]
}
4 changes: 4 additions & 0 deletions vc-extension/level-highlight/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/**
.vscode-test/**
.gitignore
vsc-extension-quickstart.md
30 changes: 30 additions & 0 deletions vc-extension/level-highlight/language-configuration.json
Original file line number Diff line number Diff line change
@@ -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": [
["{", "}"],
["[", "]"],
["(", ")"],
["\"", "\""],
["'", "'"]
]
}
25 changes: 25 additions & 0 deletions vc-extension/level-highlight/package.json
Original file line number Diff line number Diff line change
@@ -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"
}]
}
}
43 changes: 43 additions & 0 deletions vc-extension/level-highlight/syntaxes/level.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -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": {}
}
29 changes: 29 additions & 0 deletions vc-extension/level-highlight/vsc-extension-quickstart.md
Original file line number Diff line number Diff line change
@@ -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 `<user home>/.vscode/extensions` folder and restart Code.
* To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.
Loading