91 lines
2.6 KiB
YAML
91 lines
2.6 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|AVSCVLTA|CLAVES|DECIMATIO|DIC|DORMI|EVERRE|FORTVITVS_NVMERVS|FORTVITA_ELECTIO|LEGE|LONGITVDO|NVMERVS|ORDINA|PETE|PETITVR|QVAERE|SCINDE|SCRIBE|SEMEN|SENATVS|SVBSTITVE|TYPVS)\b'
|
|
scope: support.function.builtin.centvrion
|
|
|
|
modules:
|
|
- match: '\b(FORS|FRACTIO|MAGNVM|RETE|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
|