Files
ivy/ivy.vscode/ivy/ivy.tmLanguage.json

119 lines
2.1 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "Ivy",
"patterns": [
{
"include": "#comment"
},
{
"include": "#const"
},
{
"include": "#ident"
},
{
"include": "#keywords"
},
{
"include": "#strings"
},
{
"include": "#class"
}
],
"repository": {
"ident": {
"patterns": [
{
"name": "variable.parameter.ivy",
"match": "\\b[a-z]([A-Za-z0-9_]+):\\b"
},
{
"name": "entity.name.type.ivy",
"match": "\\[A-Z]{1,2}([a-z0-9]+[A-Z]{0,2})*\\b"
}
]
},
"const": {
"patterns": [
{
"name": "constant.numeric.ivy",
"match": "[\\b\\s]#[a-z0-9]*[\\b\\s]"
}
]
},
"keywords": {
"patterns": [
{
"name": "keyword.control.ivy",
"match": "\\b(for|while|break|continue|if|elif|else|unless|match)[^:]\\b"
},
{
"name": "keyword.control.ivy",
"match": "\\b(for|while|break|continue|if|elif|else|unless|match)[^:]\\b"
},
{
"name": "storage.type.ivy",
"match": "\\b(class|protocol)[^:]\\b"
},
{
"name": "keyword.other.ivy",
"match": "\\b(package|use|in)[^:]\\b"
},
{
"name": "keyword.other.ivy",
"match": "\\b(package|use|in)[^:]\\b"
}
]
},
"strings": {
"patterns": [
{
"name": "string.quoted.single.ivy",
"begin": "'",
"end": "'",
"patterns": [
{
"name": "constant.character.escape.ivy",
"match": "\\\\."
}
]
},
{
"name": "string.quoted.double.ivy",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.ivy",
"match": "\\\\."
}
]
}
]
},
"comment": {
"patterns": [
{
"name": "comment.block.ivy",
"begin": "/\\*",
"end": "\\*/"
},
{
"name": "comment.line",
"begin": "--",
"end": "\\n"
}
]
},
"class": {
"patterns": [
{
"name": "entity.name.function.ivy",
"match": "\\b(?<=- )[a-z][A-Za-z0-9_]*"
}
]
}
},
"scopeName": "source.ivy"
}