Add syntax highlighting for vscode
This commit is contained in:
89
editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json
Normal file
89
editor/vscode/kurz-lang/syntaxes/kurz.tmLanguage.json
Normal file
@ -0,0 +1,89 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||
"name": "kurz",
|
||||
"patterns":
|
||||
[
|
||||
{
|
||||
"include": "#keywords"
|
||||
},
|
||||
{
|
||||
"include": "#strings"
|
||||
},
|
||||
{
|
||||
"include": "#comment"
|
||||
}
|
||||
],
|
||||
"repository":
|
||||
{
|
||||
"keywords":
|
||||
{
|
||||
"patterns":
|
||||
[
|
||||
{
|
||||
"name": "keyword.control.kurz",
|
||||
"match": "\\b(if|else|while)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator",
|
||||
"match": "[-+<>]|==|!=|=>|print(ln)?"
|
||||
},
|
||||
{
|
||||
"name": "support.function.kurz",
|
||||
"match": "function"
|
||||
},
|
||||
{
|
||||
"name": "support.type.kurz",
|
||||
"match": "\\b(bool|int|str|any)\\b"
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.kurz",
|
||||
"match": "[0-9]"
|
||||
},
|
||||
{
|
||||
"name": "constant.language.kurz",
|
||||
"match": "true|false"
|
||||
},
|
||||
{
|
||||
"name": "support.function.kurz",
|
||||
"match": "\\b(deq|swp|dup|req|depth|decrease)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control",
|
||||
"match": "arr"
|
||||
}
|
||||
]
|
||||
},
|
||||
"comment":
|
||||
{
|
||||
"patterns":
|
||||
[
|
||||
{
|
||||
"name": "comment.line.kurz",
|
||||
"begin": "//",
|
||||
"end": "$",
|
||||
"patterns":
|
||||
[
|
||||
{
|
||||
"name": "markup.bold.kurz",
|
||||
"match": "(TODO|FIXME):?"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"strings":
|
||||
{
|
||||
"name": "string.quoted.double.kurz",
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"patterns":
|
||||
[
|
||||
{
|
||||
"name": "constant.character.escape.kurz",
|
||||
"match": "\\\\."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scopeName": "source.kurz"
|
||||
}
|
Reference in New Issue
Block a user