mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-09 01:25:46 +00:00
Compare commits
7 Commits
67d64be858
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ad098cef5 | |||
| 0a9ae78dbd | |||
| d5906e552c | |||
| 3af3f08395 | |||
| 0890f838d1 | |||
| 5b20a64c36 | |||
| 7762060e86 |
@@ -208,7 +208,7 @@ class Tesses.CrossLang.PackageManager
|
||||
{
|
||||
each(var dep : _vm.Dependencies)
|
||||
{
|
||||
var path = /short_name/$"{dep.Name}-{dep.Version.ToString()}";
|
||||
var path = /short_name/$"{dep.Name}-{dep.Version.ToString()}.crvm";
|
||||
if(!dirFs.RegularFileExists(path))
|
||||
{
|
||||
var pkg2 = this.GetPackage(dep.Name,dep.Version.ToString());
|
||||
|
||||
@@ -119,8 +119,9 @@ class Tesses.CrossLang.BuildTool
|
||||
|
||||
FS.Local.CreateDirectory(dir / outputDir);
|
||||
|
||||
if(TypeOf(info.type) == "String" && info.type == "template")
|
||||
if(TypeOf(info.type) == "String" && info.type == "template" || info.type == "archive")
|
||||
{
|
||||
|
||||
//vfs, strm, name, version, info
|
||||
var subdir = new SubdirFilesystem(FS.Local,dir);
|
||||
var output = $"{name}-{version}.crvm";
|
||||
@@ -135,7 +136,7 @@ class Tesses.CrossLang.BuildTool
|
||||
}
|
||||
FS.WriteAllText(FS.Local, dir / ".crossarchiveignore", ignored);
|
||||
}
|
||||
FS.CreateArchive(subdir, outFile, name, version, Json.Encode(info),icon);
|
||||
FS.CreateArchive(subdir, outFile, name, version, Json.Encode(info),icon == "" ? "" : (/resDir/icon).ToString());
|
||||
outFile.Close();
|
||||
subdir.Close();
|
||||
return {
|
||||
|
||||
@@ -73,6 +73,7 @@ func Tesses.CrossLang.Shell.New(dd)
|
||||
proj.version = "1.0.0.0-prod";
|
||||
var old_info = proj.info;
|
||||
proj.info = old_info.template_info;
|
||||
proj.icon = old_info.template_icon;
|
||||
proj.dependencies = old_info.template_project_dependencies;
|
||||
var srcDir = proj.source_directory;
|
||||
if(TypeOf(srcDir) == "Undefined") srcDir = "/src";
|
||||
|
||||
@@ -17,7 +17,14 @@
|
||||
"aliases": ["CrossLang", "crosslang"],
|
||||
"extensions": [".tcross"],
|
||||
"configuration": "./language-configuration.json"
|
||||
},{
|
||||
},
|
||||
{
|
||||
"id": "bcrosslang",
|
||||
"aliases": ["Better CrossLang", "better-crosslang"],
|
||||
"extensions": [".btcross"],
|
||||
"configuration": "./language-configuration.json"
|
||||
}
|
||||
,{
|
||||
"id": "crossasm",
|
||||
"aliases": ["CrossAsm", "crossasm"],
|
||||
"extensions": [".tcasm"],
|
||||
@@ -27,6 +34,10 @@
|
||||
"language": "crosslang",
|
||||
"scopeName": "source.crosslang",
|
||||
"path": "./syntaxes/crosslang.tmLanguage.json"
|
||||
},{
|
||||
"language": "bcrosslang",
|
||||
"scopeName": "source.bcrosslang",
|
||||
"path": "./syntaxes/bcrosslang.tmLanguage.json"
|
||||
},{
|
||||
"language": "crossasm",
|
||||
"scopeName": "source.crossasm",
|
||||
|
||||
137
vscode-extension/syntaxes/bcrosslang.tmLanguage.json
Normal file
137
vscode-extension/syntaxes/bcrosslang.tmLanguage.json
Normal file
@@ -0,0 +1,137 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||
"name": "Better 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.bcrosslang",
|
||||
"begin": "//",
|
||||
"end": "\\n"
|
||||
},
|
||||
{
|
||||
"name": "comment.block.bcrosslang",
|
||||
"begin": "\\/\\*",
|
||||
"end": "\\*\\/"
|
||||
},
|
||||
{
|
||||
"name": "comment.line.bcrosslang",
|
||||
"begin": "#",
|
||||
"end": "\\n"
|
||||
},
|
||||
{
|
||||
"name":"comment.block.documentation.bcrosslang",
|
||||
"begin": "\\/\\^",
|
||||
"end": "\\^\\/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"strings": {
|
||||
"name": "string.quoted.double.bcrosslang",
|
||||
"begin": "\\\"",
|
||||
"end": "\\\"",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.escape.bcrosslang",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [{
|
||||
"name": "keyword.operator",
|
||||
"match": "(\\+|\\-|\\*|\\\/|\\%|\\!|\\||\\&|\\^|\\<\\<|\\>\\>|\\<|\\>|\\=)"
|
||||
}]
|
||||
},
|
||||
"function": {
|
||||
"patterns": [{
|
||||
"name": "entity.name.function.bcrosslang",
|
||||
"match": "\\b[_a-zA-Z\\x80-\\xFF\\$][_a-zA-Z0-9\\x80-\\xFF\\$]*\\("
|
||||
}]
|
||||
},
|
||||
"identifier": {
|
||||
"patterns": [{
|
||||
"name": "entity.name.bcrosslang",
|
||||
"match": "\\b[_a-zA-Z\\x80-\\xFF\\$][_a-zA-Z0-9\\x80-\\xFF\\$]*"
|
||||
}]
|
||||
},
|
||||
"double": {
|
||||
"name": "constant.numeric.bcrosslang",
|
||||
"match": "\\b[0-9][0-9]*\\.[0-9]*\\b"
|
||||
},
|
||||
|
||||
"long": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.numeric.bcrosslang",
|
||||
"match": "\\b[0-9][0-9]*\\b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"keywords": {
|
||||
"patterns": [
|
||||
{
|
||||
|
||||
"name": "constant.language.bcrosslang",
|
||||
"match": "\\b(true|false|null|undefined|this)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.new.bcrosslang",
|
||||
"match": "\\bnew\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.bcrosslang",
|
||||
"match": "\\b(if|else|while|for|do|return|each|break|try|catch|finally|defer|enumerable|yield|switch|case|default|await|breakpoint|throw)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.bcrosslang",
|
||||
"match": "\\b(Double|Long|ByteArray|List|Dictionary|Object|String|Char|Callable|Path|Filesystem|Regex|Variant|Boolean|as|var|meta|of|in|interface|delegate|extern|namespace|use|const|func|class|public|private|protected|static|operator|embed|embeddir|embedstrm|comptime|async)\\b"
|
||||
}
|
||||
]
|
||||
},
|
||||
"chars": {
|
||||
"name": "constant.character.bcrosslang",
|
||||
"begin": "'",
|
||||
"end": "'",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.character.escape.bcrosslang",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scopeName": "source.bcrosslang"
|
||||
}
|
||||
|
||||
@@ -112,11 +112,11 @@
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.crosslang",
|
||||
"match": "\\b(if|else|while|for|do|return|each|break|try|catch|finally|defer|enumerable|yield|switch|case|default|await|breakpoint|throw)\\b"
|
||||
"match": "\\b(if|else|while|for|do|return|each|in|break|try|catch|finally|defer|enumerable|yield|switch|case|default|await|breakpoint|throw)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.crosslang",
|
||||
"match": "\\b(var|const|func|class|public|private|protected|static|operator|embed|embeddir|embedstrm|comptime|async)\\b"
|
||||
"match": "\\b(meta|var|const|func|class|public|private|protected|static|operator|embed|embeddir|embedstrm|comptime|async)\\b"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user