about summary refs log tree commit diff
path: root/meta/jinx-language-syntax/syntaxes/jinx-lang.tmLanguage.json
blob: 89620ebca115301e50c6461dd2f8ceea43bda575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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"
				}
			]
		}
	}
}