1+ {
2+ "$schema" : " https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json" ,
3+ "name" : " PointerScript" ,
4+ "scopeName" : " source.pointerscript" ,
5+ "fileTypes" : [
6+ " ptrs"
7+ ],
8+ "patterns" : [{
9+ "include" : " #keyword"
10+ },
11+ {
12+ "include" : " #shebang"
13+ },
14+ {
15+ "include" : " #comment"
16+ },
17+ {
18+ "include" : " #string"
19+ },
20+ {
21+ "include" : " #number"
22+ },
23+ {
24+ "include" : " #operator"
25+ },
26+ {
27+ "include" : " #builtin-constant"
28+ },
29+ {
30+ "include" : " #type"
31+ },
32+ {
33+ "include" : " #call"
34+ },
35+ {
36+ "include" : " #identifier"
37+ },
38+ {
39+ "include" : " #punctuation"
40+ }
41+ ],
42+ "repository" : {
43+ "shebang" : {
44+ "patterns" : [{
45+ "name" : " comment.block.shebang.pointerscript" ,
46+ "match" : " ^#!.*$"
47+ }]
48+ },
49+ "comment" : {
50+ "patterns" : [{
51+ "name" : " comment.line.double-slash.pointerscript" ,
52+ "begin" : " //" ,
53+ "end" : " $"
54+ },
55+ {
56+ "name" : " comment.block.pointerscript" ,
57+ "begin" : " /\\ *" ,
58+ "end" : " \\ */"
59+ }
60+ ]
61+ },
62+ "string" : {
63+ "patterns" : [{
64+ "name" : " string.quoted.double.pointerscript" ,
65+ "begin" : " \" " ,
66+ "end" : " \" " ,
67+ "patterns" : [{
68+ "include" : " #escaped"
69+ }]
70+ },
71+ {
72+ "name" : " string.quoted.single.pointerscript" ,
73+ "begin" : " '" ,
74+ "end" : " '" ,
75+ "patterns" : [{
76+ "include" : " #escaped"
77+ }]
78+ },
79+ {
80+ "name" : " string.quoted.backtick.pointerscript" ,
81+ "begin" : " `" ,
82+ "end" : " `" ,
83+ "patterns" : [{
84+ "include" : " #escaped"
85+ }]
86+ }
87+ ]
88+ },
89+ "escaped" : {
90+ "patterns" : [{
91+ "name" : " constant.character.escape.pointerscript" ,
92+ "match" : " \\\\ ."
93+ }]
94+ },
95+ "number" : {
96+ "patterns" : [{
97+ "name" : " constant.numeric.pointerscript" ,
98+ "match" : " -?\\ b\\ d+(?:\\ .\\ d+)?(?:e[+-]?\\ d+)?\\ b"
99+ }]
100+ },
101+ "keyword" : {
102+ "patterns" : [{
103+ "name" : " keyword.control.pointerscript" ,
104+ "match" : " \\ b(break|continue|delete|throw|try|catch|finally|function|struct|switch|if|else|loop|while|do|for|foreach|return|import|as|in|from|var|const|sizeof|new|new_stack|operator|constructor|destructor|private|public|internal|static|get|set|default|case|instanceof|type|typeof|map|map_stack|cast|throw)\\ b"
105+ }]
106+ },
107+ "operator" : {
108+ "patterns" : [{
109+ "name" : " keyword.operator.pointerscript" ,
110+ "match" : " (===|!==|==|!=|<=|>=|<<=|>>=|\\ +\\ +|--|\\ +=|-=|\\ *=|/=|%=|>>|<<|&&|\\ |\\ ||\\ ^\\ ^|\\ ||\\ ^|&|=|\\ ?|:|\\ +|\\ -|\\ *|/|%|!|~|\\ .|,)"
111+ }]
112+ },
113+ "type" : {
114+ "patterns" : [{
115+ "name" : " storage.type.builtin.pointerscript" ,
116+ "match" : " \\ b(undefined|int|float|pointer|struct|function)\\ b"
117+ },
118+ {
119+ "name" : " storage.type.native.pointerscript" ,
120+ "match" : " \\ b(char|short|int|long|longlong|uchar|ushort|uint|ulong|ulonglong|i8|i16|i32|i64|u8|u16|u32|u64|float|double|f32|f64|cfunc|pointer|bool|ssize|size|intptr|uintptr|ptrdiff|var)\\ b"
121+ }
122+ ]
123+ },
124+ "builtin-constant" : {
125+ "patterns" : [{
126+ "name" : " constant.language.pointerscript" ,
127+ "match" : " \\ b(true|false|null|undefined|NaN|Infinity|PI|E)\\ b"
128+ }]
129+ },
130+ "call" : {
131+ "patterns" : [{
132+ "match" : " \\ b([_a-zA-Z][_a-zA-Z0-9]*)\\ b\\ s*(\\ ()" ,
133+ "captures" : {
134+ "1" : {
135+ "name" : " entity.name.function.pointerscript"
136+ }
137+ }
138+ }]
139+ },
140+ "identifier" : {
141+ "patterns" : [{
142+ "name" : " variable.other.pointerscript" ,
143+ "match" : " \\ b[_a-zA-Z][_a-zA-Z0-9]*\\ b"
144+ }]
145+ },
146+ "punctuation" : {
147+ "patterns" : [{
148+ "name" : " punctuation.terminator.statement.pointerscript" ,
149+ "match" : " ;"
150+ },
151+ {
152+ "name" : " punctuation.separator.parameter.pointerscript" ,
153+ "match" : " ,"
154+ },
155+ {
156+ "name" : " punctuation.section.block.begin.pointerscript" ,
157+ "match" : " \\ {"
158+ },
159+ {
160+ "name" : " punctuation.section.block.end.pointerscript" ,
161+ "match" : " \\ }"
162+ },
163+ {
164+ "name" : " punctuation.section.group.begin.pointerscript" ,
165+ "match" : " \\ ("
166+ },
167+ {
168+ "name" : " punctuation.section.group.end.pointerscript" ,
169+ "match" : " \\ )"
170+ },
171+ {
172+ "name" : " punctuation.section.array.begin.pointerscript" ,
173+ "match" : " \\ ["
174+ },
175+ {
176+ "name" : " punctuation.section.array.end.pointerscript" ,
177+ "match" : " \\ ]"
178+ }
179+ ]
180+ }
181+ }
182+ }
0 commit comments