Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 211 lines (158 sloc) 4.278 kb
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
1 { "uuid": "af6424dd-5613-463c-9e25-912ab1e9ac69",
2 "name": "Opa",
3 "scopeName": "source.opa",
4 "fileTypes": ["opa"],
5
6 "patterns": [
7
8
9 { "match": "^\\s*(package|import|import-plugin|database|db)\\b",
10 "name": "keyword.other",
11 "comment": "A keyword"
12 },
13
14 { "match": "//.*",
15 "name": "comment.line.double-dash",
16 "comment": "A line comment"
17 },
18
19 { "match": "(?=/[*][*])[ \t]*[A-Za-z_0-0]+",
20 "name": "invalid",
21 "comment": "A doc comment header"
22 },
23
24
25 { "begin": "/[*][*]",
26 "end": "[*][/]",
27 "name": "comment.block.documentation",
28 "comment": "A doc comment"
29 },
30
31 { "begin": "/[*]",
32 "end": "[*]/",
33 "name": "comment.block",
34 "comment": "A block comment"
35 },
36
37 { "match": "\\belse\\b",
38 "name": "keyword.control",
39 "comment": "A keyword"
40 },
41
0b902c0 Rudy Sicard [fix] string: escaped lbrace should not be considered as lbrace
OpaOnWindowsNow authored
42 { "match": "(?<=})(\\\"|\\{|[^\"{])*(?={)",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
43 "name": "string.quoted",
44 "comment": "A constant string part"
45 },
46
0b902c0 Rudy Sicard [fix] string: escaped lbrace should not be considered as lbrace
OpaOnWindowsNow authored
47 { "match": "\"(\\\"|\\{|[^\"{])*(?={)",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
48 "name": "string.quoted",
49 "comment": "An interpolated string start"
50 },
51
0b902c0 Rudy Sicard [fix] string: escaped lbrace should not be considered as lbrace
OpaOnWindowsNow authored
52 { "match": "(?<=})(\\\"|\\{|[^\"{])*\"",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
53 "name": "string.quoted",
54 "comment": "An interpolated string end"
55 },
56
0b902c0 Rudy Sicard [fix] string: escaped lbrace should not be considered as lbrace
OpaOnWindowsNow authored
57 { "match": "\"(\\\"|\\{|[^\"{])*\"",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
58 "name": "string.quoted",
59 "comment": "A constant string"
60 },
61
62 { "match": "\\b[0-9]+([.][0-9]+)?(e(-|[+]?)[0-9]+)?\\b",
63 "name": "constant.numeric",
64 "comment": "A real"
65 },
66
67
68 {
69 "match": "</([-A-Za-z0-9]+:)?[A-Za-z0-9]*>",
70 "name": "string.other",
71 "comment": "Close tag"
72 },
73
74 {
75 "match": "<([-A-Za-z0-9]+)?(([A-Za-z0-9]+( |>)))((?![{])(?!</).)*",
76 "name": "string.other",
77 "comment": "Tag until end or insert"
78 },
79
80 {
81 "match": "<>((?![{])(?!</).)*",
82 "name": "string.other",
83 "comment": "Tag until end or insert"
84 },
85
86 {
87 "match": "(?<=})[ \t]*>((?![{])(?!</).)*",
88 "name": "string.other",
89 "comment": "Insert end in tag"
90 },
91
92 { "match": "(?<=})([^<{])*(?=<)",
93 "name": "string.quoted",
94 "comment": "An xhtml end"
95 },
96
97
98 {
99 "match": "(?<=(</))[ \t]*>[^{]*(?=(/>))",
100 "name": "string.other",
101 "comment": "Insert end in tag"
102 },
103
104 { "match": "^[ \t]*[#][-`a-zA-Z]+[ \t]*(?=([=]|<-))",
105 "name": "storage.modifier",
106 "comment": "A dom side effect target"
107 },
108
109 { "match": "^[ \t]*[/][-`a-zA-Z/]+[ \t]*(?=([=]|<-))",
110 "name": "storage.modifier",
111 "comment": "A db side effect target"
112 },
113
114
3363754 Rudy Sicard [fix] binding: accepting number in escaped lbrace should not be consider...
OpaOnWindowsNow authored
115 { "match": "^[ \t]*[a-zA-Z_0-9]+[ \t]*(:[ \t]*[A-Za-z0-9]+[ \t]*)?(?!==)(?=[=])",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
116 "name": "support.constant",
117 "comment": "A constant binding"
118 },
119
120 { "match": "^[ \t]*`[^`]+`[ \t]*(:[A-Za-z0-9]+)?(?=[=])",
121 "name": "support.constant",
122 "comment": "A constant binding"
123 },
124
125
3363754 Rudy Sicard [fix] binding: accepting number in escaped lbrace should not be consider...
OpaOnWindowsNow authored
126 { "match": "(?<=function)[ \t]*([A-Za-z0-9.]+[ \t]+)?[a-zA-Z_0-9]+(?=[(])",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
127 "name": "support.function",
128 "comment": "A function binding"
129 },
130
131 { "match": "(?<=function)[ \t]*`[^`]+`+(?=[(])",
132 "name": "support.function",
133 "comment": "A function binding"
134 },
135
136
43f9d7b Rudy Sicard [fix] binding: exlcude condition with ==
OpaOnWindowsNow authored
137 { "match": "[a-zA-Z_]+[(][^)]*[)][ \t]*([:][^=]*?)?(?=[=])(?!==)",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
138 "name": "support.function",
139 "comment": "A function binding"
140 },
141
142 { "match": "`[^`]+`[(][^)]*[)][ \t]*(?=[=])",
143 "name": "support.function",
144 "comment": "A function binding"
145 },
146
147
148
149 { "match": "<|>|==|<=|>=|!=",
150 "name": "support.function",
151 "comment": "A comparison"
152 },
153
154
3c79598 Rudy Sicard [fix] keyword: add end
OpaOnWindowsNow authored
155 { "match": "\\b(type|function|module|match|parser|with|as|case|default|if|then|else|or|end)\\b",
5887db2 Rudy Sicard [feature] Initial commit
OpaOnWindowsNow authored
156 "name": "keyword.control",
157 "comment": "A keyword"
158 },
159
160 { "match": "(=|:|<-|[|]|->)",
161 "name": "keyword.control",
162 "comment": "A keyword"
163 },
164
165
166 { "match": "\\b(client|server|exposed)\\b",
167 "name": "invalid.illegal",
168 "comment": "A dangerous directive"
169 },
170
171 { "match": "(@client|@server|@publish)\\b",
172 "name": "invalid.illegal",
173 "comment": "A dangerous directive"
174 },
175
176 { "match": "(\\bprivate|\\bprotected|@private|@server_private|@async)\\b",
177 "name": "keyword.other",
178 "comment": "A safe directive"
179 },
180
181
182 { "match": "@static_include_directory|@static_resource_directory",
183 "name": "keyword.other",
184 "comment": "A directive"
185 },
186
187
188 { "match": "@[A-Za-z0-9_]+\\b",
189 "name": "invalid.deprecated",
190 "comment": "An exotic directive"
191 },
192
193
194
195 { "match": "[-+*/]+",
196 "name": "support.function",
197 "comment": "An operator"
198 },
199
200 { "match": "[[(){},;]|]",
201 "name": "delimiter",
202 "comment" : "delimiter, take something else for name"
203 },
204
205 { "match": "true|false|void|none|empty",
206 "name": "constant.language",
207 "comment": "A well known named constant"
208 }
209
210 ]
211 }
Something went wrong with that request. Please try again.