Basic highlighting
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@
|
|||||||
}],
|
}],
|
||||||
"grammars": [{
|
"grammars": [{
|
||||||
"language": "mist",
|
"language": "mist",
|
||||||
"scopeName": "source.ms",
|
"scopeName": "source.mist",
|
||||||
"path": "./syntaxes/mist.tmLanguage.json"
|
"path": "./syntaxes/mist.tmLanguage.json"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,46 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||||
"name": "Mist",
|
"name": "Mist",
|
||||||
|
"scopeName": "source.mist",
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{ "include": "#comments" },
|
||||||
"include": "#keywords"
|
{ "include": "#keywords" },
|
||||||
},
|
{ "include": "#strings" },
|
||||||
{
|
{ "include": "#numbers" },
|
||||||
"include": "#strings"
|
{ "include": "#types" },
|
||||||
}
|
{ "include": "#operators" }
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"keywords": {
|
"comments": {
|
||||||
"patterns": [{
|
"patterns": [
|
||||||
"name": "keyword.control.mist",
|
{
|
||||||
"match": "\\b(if|while|for|return)\\b"
|
"name": "comment.line.double-slash.mist",
|
||||||
}]
|
"match": "//.*$"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"keywords": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "keyword.control.flow.mist",
|
||||||
|
"match": "\\b(if|else|for|return|function|class|struct|import|let|const)\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constant.language.null.mist",
|
||||||
|
"match": "\\b(null)\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constant.language.this.mist",
|
||||||
|
"match": "\\b(this)\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constant.language.boolean.mist",
|
||||||
|
"match": "\\b(true|false)\\b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
"strings": {
|
"strings": {
|
||||||
"name": "string.quoted.double.mist",
|
"name": "string.quoted.double.mist",
|
||||||
"begin": "\"",
|
"begin": "\"",
|
||||||
@@ -26,7 +51,37 @@
|
|||||||
"match": "\\\\."
|
"match": "\\\\."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"scopeName": "source.ms"
|
|
||||||
|
"numbers": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "constant.numeric.float.mist",
|
||||||
|
"match": "\\b\\d+\\.\\d+\\b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constant.numeric.integer.mist",
|
||||||
|
"match": "\\b\\d+\\b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"types": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "entity.name.type.mist",
|
||||||
|
"match": "\\b[A-Z][a-zA-Z0-9_]*\\b"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"operators": {
|
||||||
|
"patterns": [
|
||||||
|
{
|
||||||
|
"name": "keyword.operator.mist",
|
||||||
|
"match": "(==|!=|<=|>=|&&|\\|\\||[+\\-*/<>=])"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user