mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-09 01:25:46 +00:00
Compare commits
2 Commits
3af3f08395
...
0a9ae78dbd
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a9ae78dbd | |||
| d5906e552c |
@@ -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",
|
||||||
|
|||||||
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|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,7 +112,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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",
|
||||||
|
|||||||
Reference in New Issue
Block a user