about summary refs log tree commit diff
path: root/meta/jinx-language-syntax/syntaxes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/jinx-language-syntax/syntaxes')
-rw-r--r--meta/jinx-language-syntax/syntaxes/jinx-lang.tmLanguage.json122
1 files changed, 122 insertions, 0 deletions
diff --git a/meta/jinx-language-syntax/syntaxes/jinx-lang.tmLanguage.json b/meta/jinx-language-syntax/syntaxes/jinx-lang.tmLanguage.json
new file mode 100644
index 0000000..89620eb
--- /dev/null
+++ b/meta/jinx-language-syntax/syntaxes/jinx-lang.tmLanguage.json
@@ -0,0 +1,122 @@
+{
+	"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
+	"name": "Jinx Lang",
+	"scopeName": "source.jl",
+	"fileTypes": [
+		"lang",
+		"jl"
+	],
+	"patterns": [
+		{
+			"include": "#keyword"
+		},
+		{
+			"include": "#identifier"
+		},
+		{
+			"include": "#punctuation"
+		},
+		{
+			"include": "#string"
+		},
+		{
+			"include": "#numeric"
+		},
+		{
+			"include": "#comment"
+		}
+	],
+	"repository": {
+		"keyword": {
+			"patterns": [
+				{
+					"name": "keyword.declaration.jl",
+					"match": "\\b(var|fn|type)\\b"
+				},
+				{
+					"name": "keyword.control.jl",
+					"match": "\\b(if|elif|else|for|try|catch|finally)\\b"
+				},
+				{
+					"name": "keyword.control.instruction.jl",
+					"match": "\\b(return|continue|break|throw)\\b"
+				},
+				{
+					"name": "keyword.operator.operator.jl",
+					"match": "\\b(in)\\b"
+				},
+				{
+					"name": "constant.language.jl",
+					"match": "\\b(null|true|false)\\b"
+				},
+				{
+					"name": "variable.language.jl",
+					"match": "\\b(this)\\b"
+				},
+				{
+					"name": "keyword.module.jl",
+					"match": "\\b(use|from|by|global)\\b"
+				}
+			]
+		},
+		"identifier": {
+			"patterns": [
+				{
+					"match": "([a-z_][a-zA-Z0-9_]*)\\(",
+					"captures": {
+						"1": {
+							"name": "entity.name.function.jl"
+						}
+					}
+				},
+				{
+					"match": "\\b([A-Z][a-zA-Z0-9_]*)\\b",
+					"captures": {
+						"1": {
+							"name": "support.class.jl"
+						}
+					}
+				}
+			]
+		},
+		"punctuation": {
+			"patterns": [
+				{
+					"name": "keyword.operator.jl",
+					"match": "(=|\\+|-|\\*|/|%|!|==|!=|<|>|<=|>=)"
+				},
+				{
+					"name": "punctuation.jl",
+					"match": "(,|\\.|;)"
+				}
+			]
+		},
+		"string": {
+			"name": "string.jl",
+			"begin": "\"",
+			"end": "\"",
+			"patterns": [
+				{
+					"name": "constant.character.escape.jl",
+					"match": "\\\\."
+				}
+			]
+		},
+		"numeric": {
+			"patterns": [
+				{
+					"name": "constant.numeric.jl",
+					"match": "\\b([0-9](\\.?[0-9]+)*)\\b"
+				}
+			]
+		},
+		"comment": {
+			"patterns": [
+				{
+					"name": "comment.jl",
+					"match": "#.*\n"
+				}
+			]
+		}
+	}
+}
\ No newline at end of file