Add syntax highlighting for vscode

This commit is contained in:
0x4261756D
2022-12-22 05:44:08 +01:00
parent 53cfd52dcd
commit 5682ee708c
10 changed files with 198 additions and 0 deletions

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