mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-09 01:25:46 +00:00
Add the webapp launcher and syntax highlighter
This commit is contained in:
10
vscode-extension/LICENSE.md
Normal file
10
vscode-extension/LICENSE.md
Normal file
@@ -0,0 +1,10 @@
|
||||
MIT LICENSE
|
||||
===========
|
||||
Copyright 2025 Mike Nolan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
31
vscode-extension/language-configuration.json
Normal file
31
vscode-extension/language-configuration.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
|
||||
"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": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
}
|
||||
27
vscode-extension/package.json
Normal file
27
vscode-extension/package.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "crosslang",
|
||||
"displayName": "Crosslang",
|
||||
"description": "CrossLang Language Support",
|
||||
"version": "1.0.0",
|
||||
"engines": {
|
||||
"vscode": "^1.0.0"
|
||||
},
|
||||
"publisher": "tesses50",
|
||||
"repository": "https://onedev.site.tesses.net/crosslang/crosslangextras",
|
||||
"categories": [
|
||||
"Programming Languages"
|
||||
],
|
||||
"contributes": {
|
||||
"languages": [{
|
||||
"id": "crosslang",
|
||||
"aliases": ["CrossLang", "crosslang"],
|
||||
"extensions": [".tcross"],
|
||||
"configuration": "./language-configuration.json"
|
||||
}],
|
||||
"grammars": [{
|
||||
"language": "crosslang",
|
||||
"scopeName": "source.crosslang",
|
||||
"path": "./syntaxes/crosslang.tmLanguage.json"
|
||||
}]
|
||||
}
|
||||
}
|
||||
137
vscode-extension/syntaxes/crosslang.tmLanguage.json
Normal file
137
vscode-extension/syntaxes/crosslang.tmLanguage.json
Normal file
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||
"name": "CrossLang",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comment"
|
||||
},
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#chars"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#function"
|
||||
},
|
||||
{
|
||||
"include": "#identifier"
|
||||
},
|
||||
{
|
||||
"include": "#consts"
|
||||
},
|
||||
{
|
||||
"include": "#double"
|
||||
},
|
||||
{
|
||||
"include": "#long"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"comment": {
|
||||
"patterns": [{
|
||||
"name": "comment.line.double-slash.crosslang",
|
||||
"begin": "//",
|
||||
"end": "\\n"
|
||||
},
|
||||
{
|
||||
"name": "comment.block.crosslang",
|
||||
"begin": "\\/\\*",
|
||||
"end": "\\*\\/"
|
||||
},
|
||||
{
|
||||
"name": "comment.line.crosslang",
|
||||
"begin": "#",
|
||||
"end": "\\n"
|
||||
},
|
||||
{
|
||||
"name":"comment.block.documentation.crosslang",
|
||||
"begin": "\\/\\^",
|
||||
"end": "\\^\\/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"strings": {
|
||||
"name": "string.quoted.double.crosslang",
|
||||
"begin": "\\\"",
|
||||
"end": "\\\"",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.escape.crosslang",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [{
|
||||
"name": "keyword.operator",
|
||||
"match": "(\\+|\\-|\\*|\\\/|\\%|\\!|\\||\\&|\\^|\\<\\<|\\>\\>|\\<|\\>|\\=)"
|
||||
}]
|
||||
},
|
||||
"function": {
|
||||
"patterns": [{
|
||||
"name": "entity.name.function.crosslang",
|
||||
"match": "\\b[_a-zA-Z\\x80-\\xFF\\$][_a-zA-Z0-9\\x80-\\xFF\\$]*\\("
|
||||
}]
|
||||
},
|
||||
"identifier": {
|
||||
"patterns": [{
|
||||
"name": "entity.name.crosslang",
|
||||
"match": "\\b[_a-zA-Z\\x80-\\xFF\\$][_a-zA-Z0-9\\x80-\\xFF\\$]*"
|
||||
}]
|
||||
},
|
||||
"double": {
|
||||
"name": "constant.numeric.crosslang",
|
||||
"match": "\\b[0-9][0-9]*\\.[0-9]*\\b"
|
||||
},
|
||||
|
||||
"long": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.numeric.crosslang",
|
||||
"match": "\\b[0-9][0-9]*\\b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"keywords": {
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
"name": "constant.language.crosslang",
|
||||
"match": "\\b(true|false|null|undefined|this)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.new.crosslang",
|
||||
"match": "\\bnew\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.crosslang",
|
||||
"match": "\\b(if|else|while|for|do|return|each|break|try|catch|finally|defer|enumerable|yield|switch|case|default|await)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.crosslang",
|
||||
"match": "\\b(var|const|func|class|public|private|protected|static|operator|embed|async)\\b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"chars": {
|
||||
"name": "constant.character.crosslang",
|
||||
"begin": "'",
|
||||
"end": "'",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.escape.crosslang",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scopeName": "source.crosslang"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user