Files
centvrion/vscode-extension/syntaxes/cent.tmLanguage.json
2026-04-22 15:35:51 +02:00

145 lines
2.9 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "CENTVRION",
"patterns": [
{
"include": "#comments"
},
{
"include": "#strings"
},
{
"include": "#keywords"
},
{
"include": "#builtins"
},
{
"include": "#modules"
},
{
"include": "#fractions"
},
{
"include": "#constants"
},
{
"include": "#variables"
}
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.block.cent",
"begin": "/\\*",
"end": "\\*/"
},
{
"name": "comment.line.double-slash.cent",
"match": "//[^\\n]*"
}
]
},
"keywords": {
"patterns": [
{
"name": "keyword.control.cent",
"match": "\\b(AETERNVM|ALIVD|AVGE|AVT|CAPE|CONTINVA|CVM|DEFINI|DESIGNA|DONICVM|DVM|ERVMPE|ET|FAC|FVNCTIO|IN|INVOCA|MINVE|NON|PER|REDI|SI|TABVLA|TEMPTA|TVNC|VSQVE|VT)\\b"
},
{
"name": "keyword.operator.comparison.cent",
"match": "\\b(DISPAR|EST|MINVS|PLVS)\\b"
},
{
"name": "keyword.operator.arithmetic.cent",
"match": "\\b(RELIQVVM)\\b"
},
{
"name": "keyword.operator.arithmetic.cent",
"match": "(\\*|\\+|-|/|&|@)"
}
]
},
"builtins": {
"patterns": [
{
"name": "support.function.builtin.cent",
"match": "\\b(ADIVNGE|AVDI_NVMERVS|AVDI|AVSCVLTA|CLAVES|DECIMATIO|DIC|DORMI|EVERRE|FORTVITVS_NVMERVS|FORTVITA_ELECTIO|LEGE|LONGITVDO|NVMERVS|ORDINA|PETE|PETITVR|QVAERE|SCINDE|SCRIBE|SEMEN|SENATVS|SVBSTITVE|TYPVS)\\b"
}
]
},
"modules": {
"patterns": [
{
"name": "support.class.module.cent",
"match": "\\b(FORS|FRACTIO|MAGNVM|RETE|SCRIPTA|SVBNVLLA)\\b"
}
]
},
"constants": {
"patterns": [
{
"name": "constant.numeric.roman.cent",
"match": "\\b[IVXLCDM][IVXLCDM_]*\\b"
},
{
"name": "constant.language.roman.cent",
"match": "\\b(VERITAS|FALSITAS)\\b"
},
{
"name": "constant.numeric.nullus.cent",
"match": "\\bNVLLVS\\b"
}
]
},
"fractions": {
"patterns": [
{
"name": "constant.numeric.fraction.cent",
"match": "\\b[IVXLCDM][IVXLCDM_]*(?:S[S:.|]*|:[S:.|]+|\\.[S:.|]*)"
},
{
"name": "constant.numeric.fraction.cent",
"match": "(?<![IVXLCDM_])(?:S[S:.|]+|:[S:.|]+)"
}
]
},
"strings": {
"patterns": [
{
"name": "string.quoted.double.cent",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.cent",
"match": "\\\\."
}
]
},
{
"name": "string.quoted.single.cent",
"begin": "'",
"end": "'",
"patterns": [
{
"name": "constant.character.escape.cent",
"match": "\\\\."
}
]
}
]
},
"variables": {
"patterns": [
{
"name": "variable.language.cent",
"match": "\\b[abcdefghiklmnopqrstvxyz_]+\\b"
}
]
}
},
"scopeName": "source.cent"
}