mirror of
https://github.com/Open-Argon/argon-vsc-syntax-highlighting.git
synced 2026-10-28 09:44:57 +00:00
197 lines
6.8 KiB
JSON
197 lines
6.8 KiB
JSON
{
|
|
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
"name": "Argon",
|
|
"patterns": [
|
|
{
|
|
"include": "#keywords"
|
|
},
|
|
{
|
|
"include": "#templates"
|
|
},
|
|
{
|
|
"include": "#strings"
|
|
},
|
|
{
|
|
"include": "#comments"
|
|
},
|
|
{
|
|
"include": "#numbers"
|
|
},
|
|
{
|
|
"include": "#variables"
|
|
}
|
|
],
|
|
"repository": {
|
|
"templates": {
|
|
"patterns": [
|
|
{
|
|
"name": "string.template.argon",
|
|
"begin": "`",
|
|
"beginCaptures": {
|
|
"0": { "name": "punctuation.definition.string.begin.argon" }
|
|
},
|
|
"end": "`",
|
|
"endCaptures": {
|
|
"0": { "name": "punctuation.definition.string.end.argon" }
|
|
},
|
|
"patterns": [
|
|
{
|
|
"include": "#interpolation"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"interpolation": {
|
|
"patterns": [
|
|
{
|
|
"name": "meta.interpolation.argon",
|
|
"begin": "\\$\\(",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "keyword.operator.argon"
|
|
}
|
|
},
|
|
"end": "\\)",
|
|
"endCaptures": {
|
|
"0": {
|
|
"name": "keyword.operator.argon"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{ "include": "#keywords" },
|
|
{ "include": "#numbers" },
|
|
{ "include": "#strings" },
|
|
{ "include": "#variables" }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"keywords": {
|
|
"patterns": [
|
|
{
|
|
"name": "keyword.control.argon",
|
|
"match": "\\b(if|while|for|return|do|else|continue|break|to|until|from|import|as|expose|forever|try|catch|not|in|throw)\\b"
|
|
},
|
|
{
|
|
"name": "keyword.operator.argon",
|
|
"match": "\\b((\\+|\\-|\\*|\\/|\\%|\\^|\\=|\\<|\\>)+)\\b"
|
|
},
|
|
{
|
|
"name": "keyword.operator.argon",
|
|
"match": "\\b(\\&\\&|\\|\\||\\:|\\,|\\!|\\.)\\b"
|
|
},
|
|
{
|
|
"name": "constant.character.argon",
|
|
"match": "\\b(true|false|null)\\b"
|
|
},
|
|
{
|
|
"name": "keyword.declaration.argon",
|
|
"match": "\\b(let|class)\\b"
|
|
}
|
|
]
|
|
},
|
|
"strings": {
|
|
"patterns": [
|
|
{
|
|
"name": "string.quoted.double.argon",
|
|
"begin": "\"",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.string.begin.argon"
|
|
}
|
|
},
|
|
"end": "(\")|((?:[^\\\\\\n])$)",
|
|
"endCaptures": {
|
|
"1": {
|
|
"name": "punctuation.definition.string.end.argon"
|
|
},
|
|
"2": {
|
|
"name": "invalid.illegal"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"name": "constant.character.escape.argon",
|
|
"match": "\\\\([^'])"
|
|
},
|
|
{
|
|
"name": "invalid.illegal",
|
|
"match": "\\\\."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "string.quoted.single.argon",
|
|
"begin": "'",
|
|
"beginCaptures": {
|
|
"0": {
|
|
"name": "punctuation.definition.string.begin.argon"
|
|
}
|
|
},
|
|
"end": "(\\')|((?:[^\\\\\\n])$)",
|
|
"endCaptures": {
|
|
"1": {
|
|
"name": "punctuation.definition.string.end.argon"
|
|
},
|
|
"2": {
|
|
"name": "invalid.illegal"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"name": "constant.character.escape.argon",
|
|
"match": "\\\\([^\"])"
|
|
},
|
|
{
|
|
"name": "invalid.illegal",
|
|
"match": "\\\\."
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"comments": {
|
|
"name": "comment.line",
|
|
"match": "#.*$"
|
|
},
|
|
"numbers": {
|
|
"patterns": [
|
|
{
|
|
"name": "constant.numeric.argon",
|
|
"match": "\\b((((([0-9]+(\\.[0-9]+)?)|(\\.[0-9]+))(e((\\-|\\+)?([0-9]+(\\.[0-9]+)?)))?)|([0-9]+/[0-9]+)))\\b"
|
|
},
|
|
{
|
|
"name": "constant.numeric.argon",
|
|
"match": "\\b((0b[10]+(.\\[10]+)?(e((\\-|\\+)?([0-9]+(\\.[0-9]+)?)))?))\\b"
|
|
},
|
|
{
|
|
"name": "constant.numeric.argon",
|
|
"match": "\\b((0x[a-fA-F0-9]+(\\.[a-fA-F0-9]+)?))\\b"
|
|
},
|
|
{
|
|
"name": "constant.numeric.argon",
|
|
"match": "\\b((0o[0-7]+(\\.[0-7]+)?(e((\\-|\\+)?([0-9]+(\\.[0-9]+)?)))?))\\b"
|
|
}
|
|
]
|
|
},
|
|
"variables": {
|
|
"patterns": [
|
|
{
|
|
"name": "entity.name.function.argon",
|
|
"match": "\\b(([a-zA-Z_]|(\\p{L}\\p{M}*))([a-zA-Z0-9_]|(\\p{L}\\p{M}*))*)\\b\\("
|
|
},
|
|
{
|
|
"name": "support.function.argon",
|
|
"match": "\\b(global|term|this|self|super|file|π|PI|e|√|ArgonVersion|number|string|socket|infinity|map|hex|buffer|throwError|array|boolean|time|ln|log|logN|thread|input|round|floor|ceil|sqrt|file|random|json|sin|arcsin|cos|arccos|tan|arctan|cosec|arccosec|sec|arcsec|cot|arccot|todeg|colour|torad|abs|fraction|dir|subprocess|sequence|exit|error|chr|ord|max|min|path|typeof|sha256|program)\\b"
|
|
},
|
|
{
|
|
"name": "variable.name.argon",
|
|
"match": "\\b(([a-zA-Z_]|(\\p{L}\\p{M}*))([a-zA-Z0-9_]|(\\p{L}\\p{M}*))*)\\b"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"scopeName": "source.ar"
|
|
}
|