AI poop out a vs code extension (that honestly barely works111!!)
This commit is contained in:
parent
0f201aa8c8
commit
f1412061f2
@ -4,8 +4,8 @@ var x = 1 + 2 * 3;
|
|||||||
var y = 2;
|
var y = 2;
|
||||||
}
|
}
|
||||||
var y = x - 3;
|
var y = x - 3;
|
||||||
var z = (3*5) / 3;
|
var z = (3 * 5) / 3;
|
||||||
if (x) {
|
if (x) {
|
||||||
exit(y + z);
|
exit(y + z);
|
||||||
}
|
}
|
||||||
exit (1);
|
exit (1); // Should never exit
|
||||||
@ -1,5 +1,14 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## 0.0.2
|
||||||
|
|
||||||
|
- Added operator highlighting (+, -, *, /)
|
||||||
|
- Added variable highlighting for declarations (var keyword) and usage
|
||||||
|
- Added bracket/parenthesis highlighting
|
||||||
|
- Fixed comment highlighting for single-line and block comments
|
||||||
|
- Added BSD-3-Clause license
|
||||||
|
- Improved scope names for better VSCode theme compatibility
|
||||||
|
|
||||||
## 0.0.1
|
## 0.0.1
|
||||||
|
|
||||||
- Initial release
|
- Initial release
|
||||||
29
vs-extension/LICENSE
Normal file
29
vs-extension/LICENSE
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
BSD 3-Clause License
|
||||||
|
|
||||||
|
Copyright (c) 2026, Xircon Contributors
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived from
|
||||||
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
@ -2,10 +2,30 @@
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
Adds syntax highlighting for XLang thats it.
|
- **Syntax Highlighting**: Full syntax highlighting support for XLang language
|
||||||
|
- **Keywords**: Highlighting for control flow keywords (if, else, return, var, exit)
|
||||||
|
- **Comments**: Support for single-line (//) and block (/* */) comments
|
||||||
|
- **Strings**: Double-quoted string highlighting with escape sequence support
|
||||||
|
- **Operators**: Highlighting for arithmetic operators (+, -, *, /)
|
||||||
|
- **Brackets**: Highlighting for parentheses (), square brackets [], and curly braces {}
|
||||||
|
- **Variables**: Highlighting for variable declarations and usage
|
||||||
|
- **Auto-closing Pairs**: Auto-completion for brackets, quotes, and parentheses
|
||||||
|
|
||||||
|
## Language Support
|
||||||
|
|
||||||
|
Syntax highlighting for files with `.x` extension.
|
||||||
|
|
||||||
## Release Notes
|
## Release Notes
|
||||||
|
|
||||||
|
### 0.0.2
|
||||||
|
|
||||||
|
- Added operator highlighting
|
||||||
|
- Added variable highlighting (declarations with `var` and usage)
|
||||||
|
- Added bracket/parenthesis highlighting
|
||||||
|
- Fixed comment highlighting (both line and block comments)
|
||||||
|
- Added BSD-3-Clause license
|
||||||
|
|
||||||
### 0.0.1
|
### 0.0.1
|
||||||
|
|
||||||
Initial release
|
- Initial release with basic keyword and string highlighting
|
||||||
|
|
||||||
|
|||||||
@ -1,17 +1,13 @@
|
|||||||
{
|
{
|
||||||
"comments": {
|
"comments": {
|
||||||
// symbol used for single line comment. Remove this entry if your language does not support line comments
|
|
||||||
"lineComment": "//",
|
"lineComment": "//",
|
||||||
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
|
|
||||||
"blockComment": [ "/*", "*/" ]
|
"blockComment": [ "/*", "*/" ]
|
||||||
},
|
},
|
||||||
// symbols used as brackets
|
|
||||||
"brackets": [
|
"brackets": [
|
||||||
["{", "}"],
|
["{", "}"],
|
||||||
["[", "]"],
|
["[", "]"],
|
||||||
["(", ")"]
|
["(", ")"]
|
||||||
],
|
],
|
||||||
// symbols that are auto closed when typing
|
|
||||||
"autoClosingPairs": [
|
"autoClosingPairs": [
|
||||||
["{", "}"],
|
["{", "}"],
|
||||||
["[", "]"],
|
["[", "]"],
|
||||||
@ -19,12 +15,13 @@
|
|||||||
["\"", "\""],
|
["\"", "\""],
|
||||||
["'", "'"]
|
["'", "'"]
|
||||||
],
|
],
|
||||||
// symbols that can be used to surround a selection
|
"autoCloseBefore": ":;,.)]}'\"`",
|
||||||
"surroundingPairs": [
|
"surroundingPairs": [
|
||||||
["{", "}"],
|
["{", "}"],
|
||||||
["[", "]"],
|
["[", "]"],
|
||||||
["(", ")"],
|
["(", ")"],
|
||||||
["\"", "\""],
|
["\"", "\""],
|
||||||
["'", "'"]
|
["'", "'"],
|
||||||
|
["/*", "*/"]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
"name": "xlang",
|
"name": "xlang",
|
||||||
"displayName": "XLang",
|
"displayName": "XLang",
|
||||||
"description": "Syntax highlighting for XLang.",
|
"description": "Syntax highlighting for XLang.",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.120.0"
|
"vscode": "^1.120.0"
|
||||||
},
|
},
|
||||||
@ -23,3 +23,5 @@
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,42 +2,95 @@
|
|||||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||||
"name": "xlang",
|
"name": "xlang",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
|
{
|
||||||
|
"include": "#comments"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#operators"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#brackets"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"include": "#variables"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"include": "#keywords"
|
"include": "#keywords"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"include": "#strings"
|
"include": "#strings"
|
||||||
},
|
|
||||||
{
|
|
||||||
"include": "#operators"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"keywords": {
|
"keywords": {
|
||||||
"patterns": [{
|
"patterns": [{
|
||||||
"name": "keyword.control.xlang",
|
"name": "keyword.control",
|
||||||
"match": "\\b(if|else|return|var|exit)\\b"
|
"match": "\\b(if|else|return|var|exit)\\b"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
"strings": {
|
"strings": {
|
||||||
"name": "string.quoted.double.xlang",
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "string.quoted.double",
|
||||||
"begin": "\"",
|
"begin": "\"",
|
||||||
"end": "\"",
|
"end": "\"",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"name": "constant.character.escape.xlang",
|
"name": "constant.character.escape",
|
||||||
"match": "\\\\."
|
"match": "\\\\."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"operators": {
|
"operators": {
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"name": "keyword.operator.xlang",
|
"name": "keyword.operator",
|
||||||
"match": "*|+|-|/"
|
"match": "[+*/-]|\\*|/"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"brackets": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "punctuation.bracket",
|
||||||
|
"match": "[\\(\\)\\[\\]\\{\\}]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"match": "\\bvar\\s+([a-zA-Z_][a-zA-Z0-9_]*)",
|
||||||
|
"captures": {
|
||||||
|
"0": {
|
||||||
|
"name": "keyword.control"
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"name": "variable.other"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "variable.other",
|
||||||
|
"match": "\\b(?!if|else|return|var|exit\\b)[a-zA-Z_][a-zA-Z0-9_]*\\b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"comments": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "comment.line.double-slash",
|
||||||
|
"match": "//.*$"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comment.block",
|
||||||
|
"begin": "/\\*",
|
||||||
|
"end": "\\*/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"scopeName": "source.x"
|
"scopeName": "source.x"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user