Files
centvrion/snippets/syntaxes/centvrion.sublime-syntax
2026-04-21 23:46:00 +02:00

91 lines
2.5 KiB
YAML

%YAML 1.2
---
name: Centvrion
file_extensions:
- cent
scope: source.centvrion
contexts:
main:
- include: comments
- include: strings
- include: keywords
- include: fractions
- include: numerals
- include: constants
- include: builtins
- include: modules
- include: operators
- include: identifiers
comments:
- match: '//[^\n]*'
scope: comment.line.centvrion
- match: '/\*'
scope: comment.block.centvrion
push:
- meta_scope: comment.block.centvrion
- match: '\*/'
pop: true
strings:
- match: '"'
scope: string.quoted.double.centvrion
push:
- meta_scope: string.quoted.double.centvrion
- match: '\{\{'
scope: constant.character.escape.centvrion
- match: '\}\}'
scope: constant.character.escape.centvrion
- match: '\{'
scope: punctuation.section.interpolation.begin.centvrion
push:
- clear_scopes: 1
- meta_scope: meta.interpolation.centvrion
- match: '\}'
scope: punctuation.section.interpolation.end.centvrion
pop: true
- include: main
- match: '"'
pop: true
- match: "'"
scope: string.quoted.single.centvrion
push:
- meta_scope: string.quoted.single.centvrion
- match: "'"
pop: true
fractions:
- match: '\b[IVXLCDM][IVXLCDM_]*(?:S[S:.|]*|:[S:.|]+|\.[S:.|]*)'
scope: constant.numeric.fraction.centvrion
- match: '(?<![IVXLCDM_])(?:S[S:.|]+|:[S:.|]+)'
scope: constant.numeric.fraction.centvrion
numerals:
- match: '\b[IVXLCDM][IVXLCDM_]*\b'
scope: constant.numeric.centvrion
constants:
- match: '\b(VERITAS|FALSITAS|NVLLVS)\b'
scope: constant.language.centvrion
builtins:
- match: '\b(ADIVNGE|AVDI_NVMERVS|AVDI|CLAVES|DECIMATIO|DIC|EVERRE|FORTVITVS_NVMERVS|FORTVITA_ELECTIO|LEGE|LONGITVDO|ORDINA|SCRIBE|SEMEN|SENATVS)\b'
scope: support.function.builtin.centvrion
modules:
- match: '\b(FORS|FRACTIO|MAGNVM|SCRIPTA|SVBNVLLA)\b'
scope: support.class.module.centvrion
keywords:
- match: '\b(AETERNVM|ALIVD|AVGE|AVT|CAPE|CONTINVA|DEFINI|DESIGNA|DISPAR|DONICVM|DVM|ERVMPE|EST|ET|FAC|FVNCTIO|INVOCA|IN|MINVE|MINVS|NON|PER|PLVS|REDI|RELIQVVM|SI|TABVLA|TEMPTA|TVNC|VSQVE|VT|CVM)\b'
scope: keyword.control.centvrion
operators:
- match: '[+\-*/&]'
scope: keyword.operator.centvrion
identifiers:
- match: '[abcdefghiklmnopqrstvxyz_]+'
scope: variable.other.centvrion