tipi-lang/syntax/tipi/syntaxes/tipi.tmLanguage.json
2025-11-21 17:12:53 +01:00

95 lines
No EOL
2.1 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "tipi-lang",
"patterns": [
{
"include": "#keywords"
},
{
"include": "#operators"
},
{
"include": "#strings"
},
{
"include": "#chars"
}
],
"repository": {
"keywords": {
"patterns": [
{
"name": "variable.other.tipi",
"match": "(#.+?\\(.*?\\))"
},
{
"name": "keyword.control.tipi",
"match": "\\b(fn)\\b"
},
{
"name": "storage.type.tipi",
"match": "\\b(u32|u64|i32|i64\f32|f64|string|date|char|list|map|bool)\\b"
},
{
"name": "support.function.tipi",
"match": "\\b(get|put|post|delete|patch|options)\\b"
},
{
"name": "constant.numeric.tipi",
"match": "\\b[0-9]+\\.?[0-9]*\\b"
},
{
"name": "constant.language.tipi",
"match": "\\b(true|false)\\b"
},
{
"name": "constant.character.escape.tipi",
"match": "\\\\[nrt\\\\'\"]"
},
{
"name": "comment.line.tipi",
"match": "(//.*)"
}
]
},
"operators": {
"patterns": [
{
"name": "keyword.operator.arithmetic.tipi",
"match": "\\+|\\-|\\*|\\/"
},
{
"name": "keyword.operator.comparison.tipi",
"match": "==|!=|<=|>=|<|>"
},
{
"name": "keyword.operator.assignment.tipi",
"match": "="
}
]
},
"strings": {
"name": "string.quoted.double.tipi",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.tipi",
"match": "\\\\."
}
]
},
"chars": {
"name": "string.quoted.single.tipi",
"begin": "'",
"end": "'",
"patterns": [
{
"name": "constant.character.escape.tipi",
"match": "\\\\."
}
]
}
},
"scopeName": "source.tipi"
}