Skip to content

Commit

Permalink
feat: added a whole loasd of syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
traunts committed Jan 11, 2023
1 parent e85754b commit 552271b
Showing 1 changed file with 158 additions and 13 deletions.
171 changes: 158 additions & 13 deletions syntaxes/ccini.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,32 @@
"include": "#comments"
},
{
"include": "#operators"
},
{
"include": "#keywords"
"include": "#assignments"
}
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.line",
"begin": "//",
"begin": "(^[ \\t]+)?(?=//)",
"beginCaptures": {
"0": {
"name": "comment.line.double-slash"
"1": {
"name": "punctuation.whitespace.comment.leading.cpp"
}
},
"end": "\\n"
"end": "(?!\\G)",
"patterns": [
{
"begin": "//",
"beginCaptures": {
"0": {
"name": "comment.line.double-slash"
}
},
"end": "\\n",
"name": "comment.line"
}
]
},
{
"name": "comment.block",
Expand All @@ -32,13 +40,150 @@
}
]
},
"operators:": {
"name": "keyword.operator",
"match": "(\\b=\\b)"
"assignments": {
"name": "",
"match": "^(\\t*)([[:alnum:]]*?)( = )(.*?)(\\n|\\Z)",
"captures": {
"2": {
"name": "keyword",
"patterns": [
{
"include": "#keywords"
}
]
},
"3": {
"name": "keyword.operator"
},
"4": {
"patterns": [
{
"include": "#comments"
},
{
"include": "#modulePaths"
},
{
"include": "#declarations"
},
{
"include": "#numbers"
},
{
"include": "#strings"
}
]
}
}
},
"keywords": {
"name": "keyword",
"match": "^(\\s)*([A-Z][A-z0-9]*)\\b"
"match": "(Add[A-Z][A-z0-9]*)"
},
"declarations": {
"name": "support.class",
"patterns": [
{
"name": "support.class",
"match": "Vector$"
},
{
"name": "support.class",
"match": "ContentFile$"
},
{
"name": "support.class",
"match": "SpriteFile$"
},
{
"name": "support.class",
"match": "AtomGroup$"
},
{
"name": "support.class",
"match": "Atom$"
},
{
"name": "support.class",
"match": "SoundContainer$"
},
{
"name": "support.class",
"match": "Material$"
},
{
"name": "support.class",
"match": "Color$"
},
{
"name": "support.class",
"match": "Actor$"
},
{
"name": "support.class",
"match": "MOSRotating$"
},
{
"name": "support.class",
"match": "Gib$"
},
{
"name": "support.class",
"match": "MOPixel$"
},
{
"name": "support.class",
"match": "AEmitter$"
},
{
"name": "support.class",
"match": "MOSParticle$"
},
{
"name": "support.class",
"match": "Attachable$"
},
{
"name": "support.class",
"match": "Wound$"
},
{
"name": "support.class",
"match": "AHuman$"
},
{
"name": "support.class",
"match": "ACraft$"
},
{
"name": "support.class",
"match": "ACRocket$"
},
{
"name": "support.class",
"match": "ACDropship$"
},
{
"name": "support.class",
"match": "Arm$"
},
{
"name": "support.class",
"match": "Leg$"
}
]
},
"modulePaths": {
"name": "markup.underline.link",
"match": "(([A-Z][A-z0-9]*\\.rte)(\\/[A-z0-9]*)*(\\/[A-z0-9]+\\.(wav|flac|png|bmp)))"
},
"strings": {
"name": "string.unquoted",
"match": ".+?(?!=(\/\/|\n))"
},
"numbers": {
"name": "constant.numeric",
"match": "^(-?[0-9]+\\.[0-9]+)|(-?[0-9]+)"
}
},
"scopeName": "source.ccini"
Expand Down

0 comments on commit 552271b

Please sign in to comment.