🐐 VSCode extension improvement

This commit is contained in:
2026-04-24 16:11:45 +02:00
parent bdf72b2bcc
commit 76bf509d48
2 changed files with 96 additions and 0 deletions

View File

@@ -20,6 +20,10 @@
"language": "cent",
"scopeName": "source.cent",
"path": "./syntaxes/cent.tmLanguage.json"
}],
"snippets": [{
"language": "cent",
"path": "./snippets/cent.json"
}]
}
}

View File

@@ -0,0 +1,92 @@
{
"SI": {
"prefix": "SI",
"body": ["SI ${1:condicio} TVNC {", " $0", "}"],
"description": "if/then conditional"
},
"DVM": {
"prefix": "DVM",
"body": ["DVM ${1:condicio} FAC {", " $0", "}"],
"description": "while loop"
},
"PER": {
"prefix": "PER",
"body": ["PER ${1:elementum} IN ${2:tabula} FAC {", " $0", "}"],
"description": "for-each loop"
},
"DEFINI": {
"prefix": "DEFINI",
"body": ["DEFINI ${1:nomen} ${2:parametri} VT {", " $0", "}"],
"description": "define named function"
},
"DONICVM": {
"prefix": "DONICVM",
"body": ["DONICVM ${1:i} VT ${2:I} VSQVE ${3:X} FAC {", " $0", "}"],
"description": "numeric range loop"
},
"AETERNVM": { "prefix": "AETERNVM", "body": "AETERNVM", "description": "infinite loop" },
"ALIVD": { "prefix": "ALIVD", "body": "ALIVD", "description": "else / else-if branch" },
"AVGE": { "prefix": "AVGE", "body": "AVGE", "description": "compound addition assignment (+=)" },
"AVT": { "prefix": "AVT", "body": "AVT", "description": "logical or" },
"CAPE": { "prefix": "CAPE", "body": "CAPE", "description": "catch block header" },
"CONTINVA": { "prefix": "CONTINVA", "body": "CONTINVA", "description": "skip to next loop iteration" },
"CVM": { "prefix": "CVM", "body": "CVM", "description": "include module" },
"DESIGNA": { "prefix": "DESIGNA", "body": "DESIGNA", "description": "declare and assign a variable" },
"DISPAR": { "prefix": "DISPAR", "body": "DISPAR", "description": "not-equal comparison (!=)" },
"ERVMPE": { "prefix": "ERVMPE", "body": "ERVMPE", "description": "break out of loop" },
"EST": { "prefix": "EST", "body": "EST", "description": "equality comparison (==)" },
"ET": { "prefix": "ET", "body": "ET", "description": "logical and" },
"FAC": { "prefix": "FAC", "body": "FAC", "description": "block opener for loops and functions" },
"FALSITAS": { "prefix": "FALSITAS", "body": "FALSITAS", "description": "boolean false" },
"FVNCTIO": { "prefix": "FVNCTIO", "body": "FVNCTIO", "description": "anonymous function expression" },
"HAVD_MINVS": { "prefix": "HAVD_MINVS", "body": "HAVD_MINVS", "description": "greater-or-equal (>=)" },
"HAVD_PLVS": { "prefix": "HAVD_PLVS", "body": "HAVD_PLVS", "description": "less-or-equal (<=)" },
"IN": { "prefix": "IN", "body": "IN", "description": "PER-loop iterator separator" },
"INVOCA": { "prefix": "INVOCA", "body": "INVOCA", "description": "invoke / call a function" },
"MINVE": { "prefix": "MINVE", "body": "MINVE", "description": "compound subtraction assignment (-=)" },
"MINVS": { "prefix": "MINVS", "body": "MINVS", "description": "less-than comparison (<)" },
"NON": { "prefix": "NON", "body": "NON", "description": "logical not" },
"NVLLVS": { "prefix": "NVLLVS", "body": "NVLLVS", "description": "null value" },
"PLVS": { "prefix": "PLVS", "body": "PLVS", "description": "greater-than comparison (>)" },
"REDI": { "prefix": "REDI", "body": "REDI", "description": "return from function" },
"RELIQVVM": { "prefix": "RELIQVVM", "body": "RELIQVVM", "description": "modulo / remainder" },
"TABVLA": { "prefix": "TABVLA", "body": "TABVLA", "description": "dict literal opener" },
"TEMPTA": { "prefix": "TEMPTA", "body": "TEMPTA", "description": "try block header" },
"TVNC": { "prefix": "TVNC", "body": "TVNC", "description": "then (SI branch)" },
"VERITAS": { "prefix": "VERITAS", "body": "VERITAS", "description": "boolean true" },
"VSQVE": { "prefix": "VSQVE", "body": "VSQVE", "description": "upper bound of DONICVM range" },
"VT": { "prefix": "VT", "body": "VT", "description": "assignment / binding connective" },
"ADIVNGE": { "prefix": "ADIVNGE", "body": "ADIVNGE", "description": "append string to file (SCRIPTA module)" },
"AVDI": { "prefix": "AVDI", "body": "AVDI", "description": "read a line from stdin" },
"AVDI_NVMERVS": { "prefix": "AVDI_NVMERVS", "body": "AVDI_NVMERVS", "description": "read a Roman numeral from stdin" },
"AVSCVLTA": { "prefix": "AVSCVLTA", "body": "AVSCVLTA", "description": "start HTTP server on port (RETE module)" },
"CLAVES": { "prefix": "CLAVES", "body": "CLAVES", "description": "return the keys of a dict" },
"DECIMATIO": { "prefix": "DECIMATIO", "body": "DECIMATIO", "description": "remove a random tenth of an array (FORS module)" },
"DIC": { "prefix": "DIC", "body": "DIC", "description": "print value(s) to stdout" },
"DORMI": { "prefix": "DORMI", "body": "DORMI", "description": "sleep for N seconds" },
"EVERRE": { "prefix": "EVERRE", "body": "EVERRE", "description": "clear the terminal screen" },
"FORTVITA_ELECTIO": { "prefix": "FORTVITA_ELECTIO", "body": "FORTVITA_ELECTIO", "description": "pick a random element from an array (FORS module)" },
"FORTVITVS_NVMERVS": { "prefix": "FORTVITVS_NVMERVS", "body": "FORTVITVS_NVMERVS", "description": "random integer in a range (FORS module)" },
"LEGE": { "prefix": "LEGE", "body": "LEGE", "description": "read file contents (SCRIPTA module)" },
"LONGITVDO": { "prefix": "LONGITVDO", "body": "LONGITVDO", "description": "length of array, string, or dict" },
"NVMERVS": { "prefix": "NVMERVS", "body": "NVMERVS", "description": "parse a Roman numeral string to an integer" },
"ORDINA": { "prefix": "ORDINA", "body": "ORDINA", "description": "sort an array in ascending order" },
"PETE": { "prefix": "PETE", "body": "PETE", "description": "HTTP GET request (RETE module)" },
"PETITVR": { "prefix": "PETITVR", "body": "PETITVR", "description": "register HTTP GET handler (RETE module)" },
"QVAERE": { "prefix": "QVAERE", "body": "QVAERE", "description": "regex findall" },
"SCINDE": { "prefix": "SCINDE", "body": "SCINDE", "description": "split a string by delimiter" },
"SCRIBE": { "prefix": "SCRIBE", "body": "SCRIBE", "description": "write string to file (SCRIPTA module)" },
"SEMEN": { "prefix": "SEMEN", "body": "SEMEN", "description": "seed the random number generator (FORS module)" },
"SENATVS": { "prefix": "SENATVS", "body": "SENATVS", "description": "true if a strict majority of booleans are true" },
"SVBSTITVE": { "prefix": "SVBSTITVE", "body": "SVBSTITVE", "description": "regex substitute" },
"TYPVS": { "prefix": "TYPVS", "body": "TYPVS", "description": "return the type of a value as a string" },
"FORS": { "prefix": "FORS", "body": "FORS", "description": "randomness module" },
"FRACTIO": { "prefix": "FRACTIO", "body": "FRACTIO", "description": "base-12 fractions module" },
"MAGNVM": { "prefix": "MAGNVM", "body": "MAGNVM", "description": "large-integer module (thousands suffix _)" },
"RETE": { "prefix": "RETE", "body": "RETE", "description": "networking module (HTTP)" },
"SCRIPTA": { "prefix": "SCRIPTA", "body": "SCRIPTA", "description": "file I/O module" },
"SVBNVLLA": { "prefix": "SVBNVLLA", "body": "SVBNVLLA", "description": "negative-number module (-II syntax)" }
}