upload plugin files

This commit is contained in:
aurlex 2024-07-23 21:34:19 +01:00
parent a9fa9f68a4
commit 083148320f
3 changed files with 214 additions and 0 deletions

View file

@ -0,0 +1,31 @@
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"", "notIn": ["string"] },
{ "open": "/*", "close": "*/", "notIn": ["string"] }
],
"surroundingPairs": [
{ "open": "{", "close": "}" },
{ "open": "[", "close": "]" },
{ "open": "(", "close": ")" },
{ "open": "\"", "close": "\"" }
],
"folding": {
"markers": {
"start": "^\\s*//\\s*#region\\b",
"end": "^\\s*//\\s*#endregion\\b"
}
}
}

26
package.json Normal file
View file

@ -0,0 +1,26 @@
{
"name": "hblang",
"publisher": "aurlex",
"displayName": "hblang",
"description": "Syntax highlighting for holey-bytes lang",
"version": "0.0.1",
"engines": {
"vscode": "^1.91.0"
},
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [{
"id": "hblang",
"aliases": ["hblang", "hblang"],
"extensions": [".hb"],
"configuration": "./language-configuration.json"
}],
"grammars": [{
"language": "hblang",
"scopeName": "source.hblang",
"path": "./syntaxes/hblang.tmLanguage.json"
}]
}
}

View file

@ -0,0 +1,157 @@
{
"scopeName": "source.hblang",
"name": "hblang",
"fileTypes": ["hb"],
"patterns": [
{
"include": "#comments"
},
{
"include": "#strings"
},
{
"include": "#keywords"
},
{
"include": "#types"
},
{
"include": "#declarations"
},
{
"include": "#functions"
},
{
"include": "#macros"
},
{
"include": "#structs"
},
{
"include": "#arrays"
},
{
"include": "#pointers"
},
{
"include": "#operators"
}
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.block.hblang",
"begin": "/\\*",
"end": "\\*/"
},
{
"name": "comment.line.double-slash.hblang",
"begin": "//",
"end": "$"
}
]
},
"strings": {
"patterns": [
{
"name": "string.quoted.double.hblang",
"begin": "\"",
"end": "\""
}
]
},
"keywords": {
"patterns": [
{
"name": "keyword.control.hblang",
"match": "\\b(loop|break|if|else|return)\\b"
}
]
},
"types": {
"patterns": [
{
"name": "storage.type.hblang",
"match": "\\b(uint|int|void|u\\d+|i\\d+|f\\d+)\\b"
}
]
},
"declarations": {
"patterns": [
{
"name": "variable.other.declaration.hblang",
"match": "\\b[A-Z_][A-Z0-9_]*\\b"
},
{
"name": "variable.other.assignment.hblang",
"match": "\\b[a-z_][a-z0-9_]*\\b"
}
]
},
"operators": {
"patterns": [
{
"name": "keyword.operator.hblang",
"match": "\\b(\\^|\\*|&|<<|>>|>>>|<<=|>>=|>>>=|\\+|\\-|\\*|\\/|%|\\|\\||&&|!|==|!=|<|<=|>|>=|\\||&|\\^|~|<<|>>|\\+=|-=|\\*=|\\/=|%=|\\|=|&=|\\^=|~=|<<=|>>=|>>>|@\\w+)\\b"
}
]
},
"functions": {
"patterns": [
{
"name": "entity.name.function.hblang",
"match": "\\b[a-z_][a-z0-9_]*\\b(?=\\()"
}
]
},
"macros": {
"patterns": [
{
"name": "entity.name.macro.hblang",
"match": "@\\b[a-z_][a-z0-9_]*\\b"
}
]
},
"structs": {
"patterns": [
{
"name": "storage.type.struct.hblang",
"match": "\\b[a-zA-Z_][a-zA-Z0-9_]*\\s*:=\\s*struct\\b"
},
{
"name": "storage.type.struct.hblang",
"match": "\\b\\.[a-zA-Z_][a-zA-Z0-9_]*\\b"
}
]
},
"arrays": {
"patterns": [
{
"name": "storage.type.array.hblang",
"match": "\\[\\b[a-zA-Z_][a-zA-Z0-9_]*\\b\\]"
},
{
"name": "storage.type.array.hblang",
"match": "\\[\\b[a-zA-Z_][a-zA-Z0-9_]*\\b;\\s*\\d+\\]"
}
]
},
"pointers": {
"patterns": [
{
"name": "storage.modifier.pointer.hblang",
"match": "\\^+"
},
{
"name": "keyword.operator.dereference.hblang",
"match": "\\*+"
},
{
"name": "keyword.operator.reference.hblang",
"match": "\\&+"
}
]
}
}
}