Compare commits

...

3 Commits

Author SHA1 Message Date
7ad098cef5 Add meta 2026-01-23 05:00:24 -06:00
0a9ae78dbd Add better crosslang 2026-01-22 02:28:35 -06:00
d5906e552c Add better crosslang 2026-01-22 02:27:36 -06:00
3 changed files with 151 additions and 3 deletions

View File

@@ -17,7 +17,14 @@
"aliases": ["CrossLang", "crosslang"], "aliases": ["CrossLang", "crosslang"],
"extensions": [".tcross"], "extensions": [".tcross"],
"configuration": "./language-configuration.json" "configuration": "./language-configuration.json"
},{ },
{
"id": "bcrosslang",
"aliases": ["Better CrossLang", "better-crosslang"],
"extensions": [".btcross"],
"configuration": "./language-configuration.json"
}
,{
"id": "crossasm", "id": "crossasm",
"aliases": ["CrossAsm", "crossasm"], "aliases": ["CrossAsm", "crossasm"],
"extensions": [".tcasm"], "extensions": [".tcasm"],
@@ -27,6 +34,10 @@
"language": "crosslang", "language": "crosslang",
"scopeName": "source.crosslang", "scopeName": "source.crosslang",
"path": "./syntaxes/crosslang.tmLanguage.json" "path": "./syntaxes/crosslang.tmLanguage.json"
},{
"language": "bcrosslang",
"scopeName": "source.bcrosslang",
"path": "./syntaxes/bcrosslang.tmLanguage.json"
},{ },{
"language": "crossasm", "language": "crossasm",
"scopeName": "source.crossasm", "scopeName": "source.crossasm",

View 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"
}

View File

@@ -112,11 +112,11 @@
}, },
{ {
"name": "keyword.control.crosslang", "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", "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"
} }
] ]
}, },