github-linguist 7.8.0 → 7.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/grammars/annotation.liquidhaskell.haskell.json +47 -0
  3. data/grammars/hint.haskell.json +47 -0
  4. data/grammars/hint.message.haskell.json +47 -0
  5. data/grammars/hint.type.haskell.json +47 -0
  6. data/grammars/markdown.plantuml.codeblock.json +26 -0
  7. data/grammars/source.4dm.json +104 -33
  8. data/grammars/source.abap.json +1 -1
  9. data/grammars/source.ahk.json +6 -2
  10. data/grammars/source.chapel.json +4 -4
  11. data/grammars/source.clarion.json +6 -6
  12. data/grammars/source.csound.json +1 -1
  13. data/grammars/source.dart.json +57 -31
  14. data/grammars/source.elixir.json +8 -0
  15. data/grammars/source.gcode.json +0 -4
  16. data/grammars/source.hack.json +4 -18
  17. data/grammars/source.haskell.json +47 -0
  18. data/grammars/source.hsig.json +47 -0
  19. data/grammars/source.julia.json +17 -17
  20. data/grammars/source.lean.json +19 -3
  21. data/grammars/source.lean.markdown.json +2598 -0
  22. data/grammars/source.matlab.json +215 -152
  23. data/grammars/source.mrc.json +416 -534
  24. data/grammars/source.nasl.json +155 -0
  25. data/grammars/source.nextflow.json +2 -2
  26. data/grammars/source.p4.json +21 -5
  27. data/grammars/source.prisma.json +7 -0
  28. data/grammars/source.qasm.json +66 -0
  29. data/grammars/source.ql.json +1408 -0
  30. data/grammars/source.tnsaudit.json +256 -0
  31. data/grammars/source.v.json +1 -1
  32. data/grammars/source.wsd.json +775 -0
  33. data/grammars/text.tex.latex.haskell.json +47 -0
  34. data/grammars/version +1 -1
  35. data/lib/linguist/VERSION +1 -1
  36. data/lib/linguist/file_blob.rb +1 -1
  37. data/lib/linguist/generated.rb +14 -3
  38. data/lib/linguist/heuristics.yml +7 -0
  39. data/lib/linguist/languages.json +1 -1
  40. data/lib/linguist/languages.yml +39 -0
  41. data/lib/linguist/linguist.bundle +0 -0
  42. data/lib/linguist/samples.json +1169 -38
  43. data/lib/linguist/shebang.rb +5 -3
  44. metadata +9 -3
  45. data/grammars/source.yaml-ext.json +0 -324
@@ -1,213 +1,261 @@
1
1
  {
2
- "name": "mIRC",
3
2
  "scopeName": "source.mrc",
4
3
  "patterns": [
5
4
  {
6
5
  "include": "#comments"
7
6
  },
8
7
  {
9
- "include": "#function-definitions"
8
+ "include": "#group"
10
9
  },
11
10
  {
12
- "include": "#variable-assignments"
11
+ "include": "#alias"
13
12
  },
14
13
  {
15
- "include": "#statements"
14
+ "include": "#menu"
16
15
  },
17
16
  {
18
- "include": "#labels"
17
+ "include": "#events"
19
18
  },
20
19
  {
21
- "include": "#keywords"
22
- },
23
- {
24
- "include": "#commands"
25
- },
26
- {
27
- "include": "#identifiers"
28
- },
29
- {
30
- "include": "#variables"
31
- },
32
- {
33
- "include": "#constants"
34
- },
35
- {
36
- "include": "#punctuation"
20
+ "include": "#dialog"
37
21
  }
38
22
  ],
39
23
  "repository": {
40
- "arithmetic-operators": {
41
- "patterns": [
42
- {
43
- "name": "keyword.operator.arithmetic.mrc",
44
- "match": "[+\\-/*^%]"
45
- }
46
- ]
47
- },
48
- "commands": {
24
+ "alias": {
49
25
  "patterns": [
50
26
  {
51
- "match": "(?:^|(?\u003c=[|{)]|else)\\s)\\s*((/*)(?:(!)(\\.)?|(\\.)(!)?)?!?(?i:abook|ajinvite|alias|aline|ame|amsg|anick|aop|auser|autojoin|away|avoice|background|ban|bcopy|beep|bindip|bread|breplace|bset|btrunc|bunset|bwrite|channel|clear(?:all)?|cline|clipboard|close|cnick|color|com(?:close|list|open|reg)|copy|creq|ctcreply|ctcps|dcc|ddcserver|dde|ddeserver|debug|dec|describe|dialog|did|didtok|disable|disconnect|dlevel|dline|dll|dns|dqwindow|draw(?:copy|dot|fill|line|pic|rect|replace|rot|save|size|scroll|text)|ebeeps|echo|editbox|emailaddr|enable|events|exit|fclose|filter|findtext|firewall|flash|flist|flood|flush|flushini|font|fopen|fseek|fsend|fserve|fullname|fwrite|ghide|gload|gmove|gopts|gplay|gpoint|gqreq|groups|gshow|gsize|gstop|gtalk|gunload|guser|hadd|hdec|hdel|help|hfree|hinc|hload|hmake|hop|hsave|ial(?:clear|mark)?|identd|ignore|iline|inc|invite|iuser|join|kick|linesep|links|list|load(?:buf)?|localinfo|log|logview|mdi|me|menubar|mkdir|mnick|mode|msg|nick|noop|notice|notify|omsg|onotice|part|partall|pdcc|perform|play|playctrl|pop|protect|proxy|pvoice|qme|qmsg|query|queryrn|quit|raw|reload|remini|remote|remove|rename|renwin|reseterror|resetidle|rlevel|rline|rmdir|run|ruser|save(?:buf|ini)?|say|scid|scon|server|showmirc|signal|sline|sock(?:accept|close|list|listen|mark|open|pause|read|rename|udp|write)|sound|speak|splay|sreq|strip|switchbar|timestamp|tip|tips|titlebar|tnick|tokenize|toolbar|topic|tray|treebar|ulist|unload|unset|unsetall|updatenl|url|uwho|vc(?:add|md|rem)|whois|window|winhelp|vol|write|writeini))(?=\\s)",
52
- "captures": {
27
+ "name": "meta.alias.code.mrc",
28
+ "begin": "(?i)^(alias)\\x20+(?:(-l)\\x20+)?(?!-l)([^\\s]+)\\s*",
29
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
30
+ "patterns": [
31
+ {
32
+ "include": "#code_content"
33
+ }
34
+ ],
35
+ "beginCaptures": {
53
36
  "1": {
54
- "name": "support.function.command.default.mrc"
37
+ "name": "storage.type.alias.mrc"
55
38
  },
56
39
  "2": {
57
- "name": "punctuation.definition.command.mrc"
40
+ "name": "storage.modifier.alias.mrc"
58
41
  },
59
42
  "3": {
60
- "name": "meta.keyword.operator.command.default.mrc"
61
- },
62
- "4": {
63
- "name": "meta.keyword.operator.command.silent.mrc"
64
- },
65
- "5": {
66
- "name": "meta.keyword.operator.command.silent.mrc"
67
- },
68
- "6": {
69
- "name": "meta.keyword.operator.command.default.mrc"
43
+ "name": "entity.name.function.mrc"
70
44
  }
71
45
  }
46
+ }
47
+ ]
48
+ },
49
+ "calc_content": {
50
+ "patterns": [
51
+ {
52
+ "name": "keyword.operator.arithmetic.mrc",
53
+ "match": "[+\\-*/%^]"
72
54
  },
73
55
  {
74
- "match": "(?:^|(?\u003c=[|{)]|else)\\s)\\s*((/*)(?:(!)(\\.)?|(\\.)(!)?)?(?i:timer))(\\w+)?(?=\\s)",
75
- "captures": {
56
+ "name": "meta.arithmetic.mrc",
57
+ "begin": "(\u003c=\\()",
58
+ "end": "(?\u003c=\\))",
59
+ "patterns": [
60
+ {
61
+ "include": "#calc_content"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ "code_block": {
68
+ "patterns": [
69
+ {
70
+ "name": "meta.code.block.mrc",
71
+ "begin": "{",
72
+ "end": "}",
73
+ "patterns": [
74
+ {
75
+ "include": "#code_content"
76
+ }
77
+ ]
78
+ }
79
+ ]
80
+ },
81
+ "code_content": {
82
+ "patterns": [
83
+ {
84
+ "include": "#comments"
85
+ },
86
+ {
87
+ "include": "#variables"
88
+ },
89
+ {
90
+ "include": "#identifiers"
91
+ },
92
+ {
93
+ "include": "#conditionals"
94
+ },
95
+ {
96
+ "include": "#commands"
97
+ },
98
+ {
99
+ "include": "#code_block"
100
+ }
101
+ ]
102
+ },
103
+ "commands": {
104
+ "patterns": [
105
+ {
106
+ "begin": "(?i)(?:\\x20+\\|\\x20+|(?\u003c=else\\x20)|^\\x20*|\\)|\\G)\\x20*(\\/+)?([!|.]{1,2})?((?:win)?help|server|disconnect|join|hop|part|part(?:all)?|quit|list|links|quote|raw|(?:a|q)?me|(?:a|q|o|v|priv)?msg|action|(?:o|v)?notice|describe|query|sound|ctcp|dcc|wall(?:chops|voices)|uwho|sock(?:accept|close|list|listen|mark|open|pause|read|rename|udp|write)|b(?:read|replace|copy|set|trunc|unset|write)|com(?:close|list|open|reg)|dialog|did(?:tok)?|draw(?:copy|dot|fill|line|pic|rect|replace|rot|save|scroll|size|text)|f(?:open|list|seek|write|close)|(?:a|c|d|i|r|s)line|clear(?:all|ial)?|window|g(?:hide|(?:un)?load|move|opts|play|point|qreq|show|size|stop|talk)|h(?:add|dec|del|free|inc|load|make|save)|break|continue|goto|halt(?:def)?|return(?:ex)?|dec|inc|set|var|unset(?:all)|dec|inc|set|var|unset(?:all)?|(?:a|g|i|r)user|(?:d|r)level|ulist|flush|ial(?:clear|mark|fill)?|copy|flushini|(?:mk|rm)dir|rem(?:ini|ove)|rename|write(?:ini)?|aop|avoice|ban|channel|ignore|leave|mode|parseline|pop|protect|pvoice|say|updatenl|abook|ajinvite|alias|(?:a|c|m|t)nick|auto(?:join)?|background|beep|bindip|clipboard|colou?r|creq|ctcp(?:reply|s)|dccserver|dde(?:server)?|debug|disable|dll|dns|dqwindow|ebeeps|exit|echo|editbox|emailaddr|enable|events|filter|findtext|finger|firewall|flash|flood|fnord|font|fsend|fserve|fullname|fupdate|groups|hotlink|identd|linesep|load(?:buf)?|localinfo|log(?:view)?|mdi|menubar|noop|notify|pdcc|perform|play(?:ctrl)?|proxy|queryrn|registration|reload|remote|renwin|reset(?:error|idle)|run|save(?:buf|ini)?|scid|scon|setlayer|showmirc|signal|speak|splay|sreq|strip|switchbar|time(?:stamp|rs|r([^\\s]+)?)|tips?|titlebar|tokenize|toolbar|tray|treebar|unload|url|vc(?:add|md|rem)|vol|xyzzy|away|close(?:msg)?|username|aclear|advertise|allnick|autoconnect|aquit|back|banlist|betaup|bin2txt|bw|channels|charset|config|cycleall|de(?:halfop|s?op|voice)|dock(?:panels)?|download|echo(?:monitor|x)|edit|encoding|fakeraw|fget|fullscreen|gcmem|globalkeys|p?google|halfop|highlight|icon|inick|inlineimage|kblayout|lag|linemarker|lock|logs|msgbox|mute|nextunread|nick(?:column|list)|nmsg|np|oline|options|paths|pause|plugins|priv|quick(?:connect|save)|raw(?:log|x)|re(?:alname|connect|freshsong|join|solve|start)|scripts|scrolltext|search|sendkeys|serverlist|set(?:config|option)|show(?:adiirc|menu)|slap|sleep|sop|statusbar|tab|themes|topicbox|usernick|txt2bin|un(?:ban|ignore|notify)|update|vars|viewlog|voice|w(?:down|jump|next|pause|play))(?=\\b)",
107
+ "end": "(?=\\z|\\x20+\\|\\x20+[^\\x20]|\\x20}|$)",
108
+ "patterns": [
109
+ {
110
+ "include": "#switches"
111
+ },
112
+ {
113
+ "include": "#parameters"
114
+ }
115
+ ],
116
+ "beginCaptures": {
76
117
  "1": {
77
- "name": "support.function.command.default.mrc"
118
+ "name": "keyword.other.command.symbol.mrc"
78
119
  },
79
120
  "2": {
80
- "name": "punctuation.definition.command.mrc"
121
+ "name": "keyword.other.command.symbol.mrc"
81
122
  },
82
123
  "3": {
83
- "name": "meta.keyword.operator.command.default.mrc"
124
+ "name": "keyword.control.command.mrc"
84
125
  },
85
126
  "4": {
86
- "name": "meta.keyword.operator.command.silent.mrc"
87
- },
88
- "5": {
89
- "name": "meta.keyword.operator.command.silent.mrc"
90
- },
91
- "6": {
92
- "name": "meta.keyword.operator.command.default.mrc"
127
+ "name": "support.variable.name.mrc"
93
128
  }
94
129
  }
95
130
  },
96
131
  {
97
- "match": "(?:^|(?\u003c=[|{)]|else)\\s)\\s*((/+)(\\.)?\\w+)(?=\\s)",
98
- "captures": {
132
+ "name": "meta.cmd.mrc",
133
+ "begin": "(?i)(?:\\x20+\\|\\x20+|(?\u003c=else\\x20)|^\\x20*|\\)|\\G)\\x20*(?!\\|\\|\\x20)(\\/+)?([!|.]{1,2})?(?:(?![{};%\u0026$]|if|else(?:if)?|while)([^\\s]+))",
134
+ "end": "(?=\\z|\\x20\\|\\x20[^\\x20]|\\x20}|$)",
135
+ "patterns": [
136
+ {
137
+ "include": "#switches"
138
+ },
139
+ {
140
+ "include": "#parameters"
141
+ }
142
+ ],
143
+ "beginCaptures": {
99
144
  "1": {
100
- "name": "entity.name.function.command.custom.mrc"
145
+ "name": "keyword.other.command.symbol.mrc"
101
146
  },
102
147
  "2": {
103
- "name": "punctuation.definition.command.mrc"
148
+ "name": "keyword.other.command.symbol.mrc"
104
149
  },
105
150
  "3": {
106
- "name": "meta.keyword.operator.command.silent.mrc"
151
+ "name": "support.function.name.mrc"
107
152
  }
108
153
  }
109
154
  }
110
155
  ]
111
156
  },
112
- "comments": {
157
+ "comment_block": {
113
158
  "patterns": [
114
159
  {
115
160
  "name": "comment.block.mrc",
116
- "begin": "(?:^|(?\u003c=\\s))(/\\*)",
117
- "end": "(\\*/)",
118
- "beginCaptures": {
119
- "1": {
120
- "name": "punctuation.definition.comment.slash-star.mrc"
121
- }
122
- },
123
- "endCaptures": {
124
- "1": {
125
- "name": "punctuation.definition.comment.star-slash.mrc"
126
- }
127
- }
128
- },
161
+ "begin": "^(?:\\x20*)\\/\\*",
162
+ "end": "^(?:\\x20*)\\*\\/$"
163
+ }
164
+ ]
165
+ },
166
+ "comment_documentation": {
167
+ "patterns": [
129
168
  {
130
- "name": "comment.line.mrc",
131
- "match": "(?:^|(?\u003c=\\s));.*",
132
- "captures": {
133
- "1": {
134
- "name": "punctuation.definition.comment.semicolon.mrc"
169
+ "name": "comment.block.documentation.mrc",
170
+ "begin": "^(?:\\x20*)(\\/\\*\\*)$",
171
+ "end": "^(?:\\x20*)\\*\\/$",
172
+ "patterns": [
173
+ {
174
+ "include": "#documentation_block"
135
175
  }
136
- }
176
+ ]
137
177
  }
138
178
  ]
139
179
  },
140
- "comparison-operators": {
180
+ "comment_line": {
141
181
  "patterns": [
142
182
  {
143
- "name": "keyword.operator.comparison.mrc",
144
- "match": "===?|[!\u003c\u003e]=|\u003c|\u003e|//|\\\\|is(?:in(?:cs)?|wm(?:cs)?|num|letter|alnum|alpha|lower|upper|on|op|hop|voice|reg|chan|ban|invite|except|aop|avoice|ignore|protect|notify)"
145
- },
146
- {
147
- "name": "keyword.operator.logical.mrc",
148
- "match": "!|\u0026\u0026?|\\|\\|"
183
+ "name": "comment.line.semicolon.mrc",
184
+ "begin": "(?\u003c=\\G|\\x20\\|\\x20|^)(?:\\x20*);",
185
+ "end": "(?=\\z|\\x20+\\|\\x20+[^\\s]|\\x20}|$)"
149
186
  }
150
187
  ]
151
188
  },
152
- "constants": {
189
+ "comments": {
153
190
  "patterns": [
154
191
  {
155
- "name": "constant.numeric.mrc",
156
- "match": "(?:^|(?\u003c=\\W))(?:-)?\\d+(?:\\.\\d+)?\\b"
192
+ "include": "#comment_documentation"
157
193
  },
158
194
  {
159
- "name": "meta.constant.other.channel.mrc",
160
- "match": "(?\u003c=[\\s\\[(,:=])#\\w*"
195
+ "include": "#comment_block"
161
196
  },
162
197
  {
163
- "name": "meta.constant.other.window.mrc",
164
- "match": "(?\u003c=[\\s\\[(,:=])@\\w+"
198
+ "include": "#comment_line"
165
199
  }
166
200
  ]
167
201
  },
168
- "function-definitions": {
202
+ "conditionals": {
169
203
  "patterns": [
170
204
  {
171
- "match": "^(?i)^(alias)\\s+(?:-l\\s+)?(\\w+)\\s+(?={)",
172
- "captures": {
205
+ "name": "meta.conditional.mrc",
206
+ "begin": "(?i)(?:(?\u003c=\\x20\\|\\x20|^|\\G)\\x20*(if|elseif|while)|(?:(?\u003c=\\))\\x20+(\u0026\u0026|\\|\\|)))\\x20+(?=\\()",
207
+ "end": "(?=\\)(?:\\x20|$))",
208
+ "patterns": [
209
+ {
210
+ "include": "#conditionals_content"
211
+ },
212
+ {
213
+ "include": "#parameters"
214
+ }
215
+ ],
216
+ "beginCaptures": {
173
217
  "1": {
174
- "name": "storage.type.alias.mrc"
218
+ "name": "keyword.control.conditional.mrc"
175
219
  },
176
220
  "2": {
177
- "name": "entity.name.function.mrc"
221
+ "name": "keyword.control.conditional.mrc"
178
222
  }
179
223
  }
180
224
  },
181
225
  {
182
- "begin": "(?i)^(dialog)\\s+(?:-l\\s+)?(\\w+)\\s+({)",
183
- "end": "(})",
226
+ "name": "keyword.control.conditional.mrc",
227
+ "match": "(?i)(?\u003c=\\x20\\|\\x20|^)\\x20*(else)\\b"
228
+ }
229
+ ]
230
+ },
231
+ "conditionals_content": {
232
+ "patterns": [
233
+ {
234
+ "name": "keyword.operator.mrc",
235
+ "match": "(?i)((?\u003c=\\x20)!?(?:==?=?|(?:\u003c|\u003e)=?|\\/\\/|\\\\|\u0026|is(?:in(?:cs)?|wm(?:cs)?|(?:al)?num|letter|alpha|(?:low|upp)er|on|(?:a|h)?op|a?voice|reg|chan|ban|quiet|ignore|protected|notify|admin|owner|quiet|url))(?=\\x20|\\))|(?\u003c=\\()!(?=\\$|%|\u0026))"
236
+ },
237
+ {
238
+ "include": "#constants"
239
+ }
240
+ ]
241
+ },
242
+ "constants": {
243
+ "patterns": [
244
+ {
245
+ "name": "constant.numeric.mrc",
246
+ "match": "(?\u003c=\\x20|^|\\(|,)-?\\d+(\\.\\d+)?(?=\\x20|$|\\)|,)"
247
+ }
248
+ ]
249
+ },
250
+ "dialog": {
251
+ "patterns": [
252
+ {
253
+ "name": "meta.dialog.code.mrc",
254
+ "begin": "(?i)^(dialog)\\x20+(?:(-l)\\x20+)?(?!-l)([^\\s]+)\\s*(?={)",
255
+ "end": "(?\u003c=}$)",
184
256
  "patterns": [
185
257
  {
186
- "include": "#comments"
187
- },
188
- {
189
- "match": "(?i)^\\s*(title|icon|size|option|text|edit|button|check|radio|box|scroll|list|combo|link|tab|menu|item)\\s+",
190
- "captures": {
191
- "1": {
192
- "name": "entity.name.tag.mrc"
193
- }
194
- }
195
- },
196
- {
197
- "include": "#strings"
198
- },
199
- {
200
- "include": "#identifiers"
201
- },
202
- {
203
- "include": "#variables"
204
- },
205
- {
206
- "include": "#constants"
207
- },
208
- {
209
- "name": "punctuation.separator.delimiter.mrc",
210
- "match": ","
258
+ "include": "#dialog_content"
211
259
  }
212
260
  ],
213
261
  "beginCaptures": {
@@ -215,620 +263,464 @@
215
263
  "name": "storage.type.dialog.mrc"
216
264
  },
217
265
  "2": {
218
- "name": "entity.name.section.dialog.mrc"
266
+ "name": "storage.modifier.dialog.mrc"
219
267
  },
220
268
  "3": {
221
- "name": "punctuation.bracket.curly.begin.mrc"
222
- }
223
- },
224
- "endCaptures": {
225
- "1": {
226
- "name": "punctuation.bracket.curly.end.mrc"
269
+ "name": "entity.name.section.mrc"
227
270
  }
228
271
  }
272
+ }
273
+ ]
274
+ },
275
+ "dialog_content": {
276
+ "patterns": [
277
+ {
278
+ "include": "#comments"
229
279
  },
230
280
  {
231
- "match": "(?i)^(menu)\\s+(channel|menubar|nicklist|query|status|@\\w+)(,(channel|menubar|nicklist|query|status|@\\w+))*\\s+(?={)",
232
- "captures": {
281
+ "contentName": "string.quoted.double.control.mrc",
282
+ "begin": "(?i)^\\x20*(title|icon|size|option|text|edit|button|check|radio|box|scroll|list|combo|icon|link|tab|menu|item)\\x20+",
283
+ "end": "(?\u003c=$)",
284
+ "patterns": [
285
+ {
286
+ "include": "#parameters"
287
+ }
288
+ ],
289
+ "beginCaptures": {
233
290
  "1": {
234
- "name": "storage.type.menu.mrc"
291
+ "name": "keyword.control.dialog.control.mrc"
235
292
  }
236
293
  }
237
- },
238
- {
239
- "name": "entity.name.class.mrc",
240
- "match": "(?i)^(raw)\\s+.+:.+:"
241
- },
242
- {
243
- "name": "entity.name.class.mrc",
244
- "match": "(?i)^(on)\\s+.+:(ACTION|ACTIVE|AGENT|APPACTIVE|BAN|CHAT|CLOSE|CONNECT(?:FAIL)?|CTCPREPLY|DCCSERVER|DE(HELP|OP|VOICE)|DIALOG|DISCONNECT|DNS|ERROR|EXIT|FILERCVD|FILESENT|GETFAIL|HELP|HOTLINK|INPUT|INVITE|JOIN|KEY(DOWN|UP)|KICK|LOAD|LOGON|MIDIEND|MODE|MP3END|NICK|NOSOUND|NOTICE|NOTIFY|OP|OPEN|PARSELINE|PART|PING|PLAYEND|PONG|QUIT|RAWMODE|SENDFAIL|SERV(?:ERMODE|EROP)?|SIGNAL|SNOTICE|SOCK(CLOSE|LISTEN|OPEN|READ|WRITE)|START|TABCOMP|TEXT|TOPIC|UDPREAD|UN(BAN|LOAD|NOTIFY)|USERMODE|WALLOPS|WAVEEND|VCMD|VOICE):(.+:)*"
245
294
  }
246
295
  ]
247
296
  },
248
- "identifiers": {
297
+ "documentation_block": {
249
298
  "patterns": [
250
299
  {
251
- "name": "constant.language.mrc",
252
- "match": "(\\$~?)(!)?(?i:true|false|null|pi|crlf|cr|lf)\\b",
300
+ "match": "(?i)\\x20*\\*\\x20+(@(?:author|command|const(?:ant)?|copyright|deprecated|event|example|experimental|global|identifier|ignore|license|nobadges|param(?:eter)?|arg(?:ument)?|prop|returns?|see|switch|todo|version))\\b",
253
301
  "captures": {
254
302
  "1": {
255
- "name": "meta.punctuation.definition.identifier.mrc"
256
- },
257
- "2": {
258
- "name": "meta.keyword.operator.identifier.default.mrc"
303
+ "name": "storage.type.class.mrc"
259
304
  }
260
305
  }
261
- },
306
+ }
307
+ ]
308
+ },
309
+ "events": {
310
+ "patterns": [
262
311
  {
263
- "name": "keyword.operator.input-prompt.mrc",
264
- "match": "(\\$)(\\$)?~?\\?(?:[*!]?(?==))?",
265
- "captures": {
312
+ "name": "meta.event.code.mrc",
313
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:(?:action|notice|(?:client)?text):[^:]+:[^:]+:)\\s*",
314
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
315
+ "patterns": [
316
+ {
317
+ "include": "#code_content"
318
+ }
319
+ ],
320
+ "beginCaptures": {
266
321
  "1": {
267
- "name": "meta.punctuation.definition.identifier.mrc"
268
- },
269
- "2": {
270
- "name": "meta.punctuation.definition.identifier.mrc"
322
+ "name": "entity.name.type.event.mrc"
271
323
  }
272
324
  }
273
325
  },
274
326
  {
275
- "name": "support.type.parameter.mrc",
276
- "match": "(\\$)(\\$)?~?(?:\\d+(?:-\\d+|-)?|\\?\\d+)(?!\\w)",
277
- "captures": {
327
+ "name": "meta.event.code.mrc",
328
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:(?:active|input|tabcomp|mscroll):(?:\\*|#[^:]*|\\?|=|!|@[^:]*):)\\s*",
329
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
330
+ "patterns": [
331
+ {
332
+ "include": "#code_content"
333
+ }
334
+ ],
335
+ "beginCaptures": {
278
336
  "1": {
279
- "name": "meta.punctuation.definition.identifier.mrc"
280
- },
281
- "2": {
282
- "name": "meta.punctuation.definition.identifier.mrc"
337
+ "name": "entity.name.type.event.mrc"
283
338
  }
284
339
  }
285
340
  },
286
341
  {
287
- "name": "support.type.prev-result.mrc",
288
- "match": "(\\$~?)(?:!|!?(?i:ifmatch|v[12]))\\b",
289
- "captures": {
342
+ "name": "meta.event.code.mrc",
343
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:(?:agent|appactive|connect(?:fail)?|disconnect|dns|exit|(?:un)?load|(?:midi|mp3|play|song|wave)end|nick|nosound|u?notify|ping|pong|quit|start|usermode|options|resume|song|suspend):)\\s*",
344
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
345
+ "patterns": [
346
+ {
347
+ "include": "#code_content"
348
+ }
349
+ ],
350
+ "beginCaptures": {
290
351
  "1": {
291
- "name": "meta.punctuation.definition.identifier.mrc"
352
+ "name": "entity.name.type.event.mrc"
292
353
  }
293
354
  }
294
355
  },
295
356
  {
296
- "begin": "((\\$~?)\\+?)(\\()",
297
- "end": "(\\))",
357
+ "name": "meta.event.code.mrc",
358
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:(?:(?:un)?ban|(?:de)?help|(?:de|server)?op|(?:de)?owner|(?:de)?voice|invite|join|kick|(?:server|raw)?mode|part|topic|(?:de)?admin):(?:\\*|#[^:]*):)\\s*",
359
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
298
360
  "patterns": [
299
361
  {
300
- "include": "#identifiers-content"
301
- },
302
- {
303
- "include": "#identifiers-recurse"
362
+ "include": "#code_content"
304
363
  }
305
364
  ],
306
365
  "beginCaptures": {
307
366
  "1": {
308
- "name": "support.function.identifier.default.mrc"
309
- },
310
- "2": {
311
- "name": "meta.punctuation.definition.identifier.mrc"
312
- },
313
- "3": {
314
- "name": "punctuation.bracket.round.begin.mrc"
315
- }
316
- },
317
- "endCaptures": {
318
- "1": {
319
- "name": "punctuation.bracket.round.end.mrc"
367
+ "name": "entity.name.type.event.mrc"
320
368
  }
321
369
  }
322
370
  },
323
371
  {
324
- "name": "keyword.operator.string.mrc",
325
- "match": "(\\$~?)[\u0026+]\\B",
326
- "captures": {
372
+ "name": "meta.event.code.mrc",
373
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:(?:chat|ctcpreply|error|file(?:rcvd|sent)|(?:get|send)fail|logon|serv|signal|snotice|sock(?:close|listen|open|read|write)|udp(?:read|write)|vcmd|wallops|download|(?:un)?zip):[^:]+:)\\s*",
374
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
375
+ "patterns": [
376
+ {
377
+ "include": "#code_content"
378
+ }
379
+ ],
380
+ "beginCaptures": {
327
381
  "1": {
328
- "name": "meta.punctuation.definition.identifier.mrc"
382
+ "name": "entity.name.type.event.mrc"
329
383
  }
330
384
  }
331
385
  },
332
386
  {
333
- "begin": "((\\$~?)(!)?iif)(\\()",
334
- "end": "(\\))((\\.)\\w+)?",
387
+ "name": "meta.event.code.mrc",
388
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:(?:close|open):(?:\\*|\\?|=|!|@[^:]*):)\\s*",
389
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
335
390
  "patterns": [
336
391
  {
337
- "include": "#identifiers-iif-content"
338
- },
339
- {
340
- "include": "#identifiers-iif-recurse"
392
+ "include": "#code_content"
341
393
  }
342
394
  ],
343
395
  "beginCaptures": {
344
396
  "1": {
345
- "name": "support.function.identifier.default.mrc"
346
- },
347
- "2": {
348
- "name": "meta.punctuation.definition.identifier.mrc"
349
- },
350
- "3": {
351
- "name": "meta.keyword.operator.identifier.default.mrc"
352
- },
353
- "4": {
354
- "name": "punctuation.bracket.round.begin.mrc"
355
- }
356
- },
357
- "endCaptures": {
358
- "1": {
359
- "name": "punctuation.bracket.round.end.mrc"
360
- },
361
- "2": {
362
- "name": "support.function.identifier.default.property.mrc"
363
- },
364
- "3": {
365
- "name": "meta.punctuation.definition.identifier.property.mrc"
397
+ "name": "entity.name.type.event.mrc"
366
398
  }
367
399
  }
368
400
  },
369
401
  {
370
- "begin": "((\\$~?)(!)?calc)(\\()",
371
- "end": "(\\))((\\.)\\w+)?",
402
+ "name": "meta.event.code.mrc",
403
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:dccserver:(?:chat|send|fserve):)\\s*",
404
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
372
405
  "patterns": [
373
406
  {
374
- "include": "#identifiers-calc-content"
375
- },
376
- {
377
- "include": "#identifiers-calc-recurse"
407
+ "include": "#code_content"
378
408
  }
379
409
  ],
380
410
  "beginCaptures": {
381
411
  "1": {
382
- "name": "support.function.identifier.default.mrc"
383
- },
384
- "2": {
385
- "name": "meta.punctuation.definition.identifier.mrc"
386
- },
387
- "3": {
388
- "name": "meta.keyword.operator.identifier.default.mrc"
389
- },
390
- "4": {
391
- "name": "punctuation.bracket.round.begin.mrc"
392
- }
393
- },
394
- "endCaptures": {
395
- "1": {
396
- "name": "punctuation.bracket.round.end.mrc"
397
- },
398
- "2": {
399
- "name": "support.function.identifier.default.property.mrc"
400
- },
401
- "3": {
402
- "name": "meta.punctuation.definition.identifier.property.mrc"
412
+ "name": "entity.name.type.event.mrc"
403
413
  }
404
414
  }
405
415
  },
406
416
  {
407
- "begin": "((\\$~?)(!)?(?i:abook|abs|acos|address|addtok|agent|alias|and|ansi2mirc|aop|asc|asctime|asin|atan2?|avoice|base|bfind|bindip|bitoff|biton|bvar|bytes|cb|ceil|chan|chat|chr|click|cnick|color|com(?:call|chan|val)?|compress|cosh?|count|countcs|crc|ctime|dccignore|dde|decode|decompress|deltok|dialog|did(?:reg|tok|wm)?|disk|dll|dllcall|dns|duration|editbox|encode|eval|exists|fgetc|file|find(?:dir|file|tok)|fline|floor|fopen|fread|fserve|get(?:dot|tok)?|group|hash|height|hfind|hget|highlight|hypot|ial|ialchan|ibl|iel|ignore|iil|inellipse|ini|inpoly|input|inrect|inroundrect|instok|int|intersect|iptype|isalias|isbit|isdde|isdir|isfile|islower|istok|istokcs|isupper|left|len|level|line|lines|link|lock|log|log10|longfn|longip|lower|mask|matchtok|matchtokcs|md5|mid|mk(?:fn|logfn|nickfn)|mode|msfile|nick|nofile|nopath|noqt|not|notags|notify|numtok|onpoly|or|ord|pic|play|portfree|pos|poscs|protect|puttok|qt|query|rand|read|readini|reg(?:ex|ml|mlex|sub|subex)|remove|removecs|remtok|remtokcs|replacex?|replacex?cs|reptok|reptokcs|rgb|right|round|scid|scon|script|sdir|send|server|sfile|sha1|shortfn|sin|sline|snick|sock|sorttok|sorttokcs|sound|speak|sqrt|str|strip|style|submenu|tanh?|timer|tip|toolbar|trust|ulist|upper|uptime|var|vcmd|width|wildtok|wildtokcs|window|vol|wrap|xor))(\\()",
408
- "end": "(\\))((\\.)\\w+)?",
417
+ "name": "meta.event.code.mrc",
418
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:dialog:[^:]+:(?:init|close|edit|sclick|dclick|menu|scroll|mouse|rclick|drop|\\*):[\\d\\-,\\*]+:)\\s*",
419
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
409
420
  "patterns": [
410
421
  {
411
- "include": "#identifiers-content"
412
- },
413
- {
414
- "include": "#identifiers-recurse"
422
+ "include": "#code_content"
415
423
  }
416
424
  ],
417
425
  "beginCaptures": {
418
426
  "1": {
419
- "name": "support.function.identifier.default.mrc"
420
- },
421
- "2": {
422
- "name": "meta.punctuation.definition.identifier.mrc"
423
- },
424
- "3": {
425
- "name": "meta.keyword.operator.identifier.default.mrc"
426
- },
427
- "4": {
428
- "name": "punctuation.bracket.round.begin.mrc"
429
- }
430
- },
431
- "endCaptures": {
432
- "1": {
433
- "name": "punctuation.bracket.round.end.mrc"
434
- },
435
- "2": {
436
- "name": "support.function.identifier.default.property.mrc"
437
- },
438
- "3": {
439
- "name": "meta.punctuation.definition.identifier.property.mrc"
427
+ "name": "entity.name.type.event.mrc"
440
428
  }
441
429
  }
442
430
  },
443
431
  {
444
- "name": "support.type.identifier.default.noargs.mrc",
445
- "match": "(\\$~?)(!)?(?i:active(?:cid|wid)?|address|agent(?:name|stat|ver)|anick|aop|appactive|appstate|away(?:msg|time)?|avoice|banmask|bnick|cb|cd|chan(?:modes|types)?|cid|clevel|cmdbox|cmdline|comerr|compact|creq|ctimer?|ctrlenter|date|day|daylight|dbuh|dbuw|dccignore|dccport|ddename|debug|devent|dlevel|dname|ebeeps|emailaddr|error|event|feof|ferr|filename|filtered|find(?:dirn|filen)|full(?:address|date|name|screen)|getdir|gmt|halted|highlight|hnick|host|hotline|hotlinepos|ial|idle|ignore|inmidi|inpaste|insong|inwave|ip|isid|key(?:char|rpt|val)|knick|lactive(?:cid|wid)?|leftwin(?:cid|wid)?|locked|log(?:dir|stamp|stampfmt)?|ltimer|maddress|matchkey|me|menu(?:bar|context|type)?|mididir|mirc(?:dir|exe|ini)|mnick|mode(?:first|last|spl)|mouse|network|newnick|nick|numeric|online|opnick|os|passivedcc|pi|pnick|port|portable|prefix|prop|protect|rawbytes|rawmsg|readn|remote|result|script(?:dir|line)?|server(?:ip|target)?|show|signal|site|snicks|snotify|sock(?:br|err|name)|sreq|ssl(?:dll|libdll|ready|version)?|status|stripped|switchbar|target|ticks|time|timestamp|timestampfmt|timezone|tips|titlebar|toolbar|treebar|ulevel|url|usermode|vcmd(?:stat|ver)|version|wid|wildsite|window|vnick)\\b",
446
- "captures": {
432
+ "name": "meta.event.code.mrc",
433
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:hotlink:[^:]+:(?:\\*|#[^:]*|\\?|=|!|@[^:]*):)\\s*",
434
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
435
+ "patterns": [
436
+ {
437
+ "include": "#code_content"
438
+ }
439
+ ],
440
+ "beginCaptures": {
447
441
  "1": {
448
- "name": "meta.punctuation.definition.identifier.mrc"
449
- },
450
- "2": {
451
- "name": "meta.keyword.operator.identifier.default.mrc"
442
+ "name": "entity.name.type.event.mrc"
452
443
  }
453
444
  }
454
445
  },
455
446
  {
456
- "begin": "((\\$)(!)?\\w+)(\\()",
457
- "end": "(\\))((\\.)\\w+)?",
447
+ "name": "meta.event.code.mrc",
448
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:key(?:down|up):(?:\\*|@[^:]*):(?:\\*|\\d+(?:,\\d+)*):)\\s*",
449
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
458
450
  "patterns": [
459
451
  {
460
- "include": "#identifiers-content"
461
- },
462
- {
463
- "include": "#identifiers-recurse"
452
+ "include": "#code_content"
464
453
  }
465
454
  ],
466
455
  "beginCaptures": {
467
456
  "1": {
468
- "name": "entity.name.function.identifier.custom.mrc"
469
- },
470
- "2": {
471
- "name": "meta.punctuation.definition.identifier.mrc"
472
- },
473
- "3": {
474
- "name": "meta.keyword.operator.identifier.default.mrc"
475
- },
476
- "4": {
477
- "name": "punctuation.bracket.round.begin.mrc"
478
- }
479
- },
480
- "endCaptures": {
481
- "1": {
482
- "name": "punctuation.bracket.round.end.mrc"
483
- },
484
- "2": {
485
- "name": "entity.name.function.identifier.custom.property.mrc"
486
- },
487
- "3": {
488
- "name": "meta.punctuation.definition.identifier.property.mrc"
457
+ "name": "entity.name.type.event.mrc"
489
458
  }
490
459
  }
491
460
  },
492
461
  {
493
- "name": "entity.name.function.identifier.custom.noargs.mrc",
494
- "match": "(\\$)(!)?\\w+",
495
- "captures": {
462
+ "name": "meta.event.code.mrc",
463
+ "begin": "^(?i)(on\\x20+(?:me:)?[^:\\s]+:parseline:(?:\\*|in|out):[^:]+:)\\s*",
464
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
465
+ "patterns": [
466
+ {
467
+ "include": "#code_content"
468
+ }
469
+ ],
470
+ "beginCaptures": {
496
471
  "1": {
497
- "name": "meta.punctuation.definition.identifier.mrc"
498
- },
499
- "2": {
500
- "name": "meta.keyword.operator.identifier.default.mrc"
472
+ "name": "entity.name.type.event.mrc"
501
473
  }
502
474
  }
503
- }
504
- ]
505
- },
506
- "identifiers-calc-content": {
507
- "patterns": [
508
- {
509
- "include": "#identifiers-content"
510
- },
511
- {
512
- "include": "#arithmetic-operators"
513
475
  },
514
476
  {
515
- "include": "#identifiers-calc-recurse"
516
- }
517
- ]
518
- },
519
- "identifiers-calc-recurse": {
520
- "patterns": [
521
- {
522
- "begin": "(\\()",
523
- "end": "(\\))",
477
+ "name": "meta.event.code.mrc",
478
+ "begin": "^(?i)(raw\\x20+[^:\\s]+:[^:]+:)\\s*",
479
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
524
480
  "patterns": [
525
481
  {
526
- "include": "#identifiers-calc-content"
527
- },
528
- {
529
- "include": "#identifiers-calc-recurse"
482
+ "include": "#code_content"
530
483
  }
531
484
  ],
532
485
  "beginCaptures": {
533
486
  "1": {
534
- "name": "punctuation.bracket.round.begin.mrc"
487
+ "name": "entity.name.type.event.mrc"
535
488
  }
536
- },
537
- "endCaptures": {
489
+ }
490
+ },
491
+ {
492
+ "name": "meta.event.code.mrc",
493
+ "begin": "^(?i)(ctcp\\x20+[^:\\s]+:[^:]+:(?:\\*|#.*|\\?):)\\s*",
494
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|(?\u003c=}$)",
495
+ "patterns": [
496
+ {
497
+ "include": "#code_content"
498
+ }
499
+ ],
500
+ "beginCaptures": {
538
501
  "1": {
539
- "name": "punctuation.bracket.round.end.mrc"
502
+ "name": "entity.name.type.event.mrc"
540
503
  }
541
504
  }
542
505
  }
543
506
  ]
544
507
  },
545
- "identifiers-content": {
508
+ "group": {
546
509
  "patterns": [
547
510
  {
548
- "include": "#identifiers"
549
- },
550
- {
551
- "include": "#variables"
552
- },
511
+ "name": "keyword.other.groupname.mrc",
512
+ "match": "(?i)^#[^\\s]+ (on|off|end)(?:\\b)"
513
+ }
514
+ ]
515
+ },
516
+ "identifiers": {
517
+ "patterns": [
553
518
  {
554
- "include": "#constants"
519
+ "include": "#identifiers_params"
555
520
  },
556
521
  {
557
- "name": "punctuation.separator.delimiter.mrc",
558
- "match": ","
522
+ "include": "#identifiers_no_params"
559
523
  }
560
524
  ]
561
525
  },
562
- "identifiers-iif-content": {
526
+ "identifiers_no_params": {
563
527
  "patterns": [
564
528
  {
565
- "include": "#comparison-operators"
529
+ "name": "keyword.other.identifier.mrc",
530
+ "match": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)\\$\\$?~?(0|\\!|\u0026(?=$)|\\*|\\+\\+?|[1-9]+(-?([0-9]+)|[^\\s|\\)|,]+)?|active((c|w)id)?|a?date|adiirc(dir([^\\s,)]+)?|exe|ini)|address|admnick|agent(name|stat|ver)|album|anick|aop|app(active|bits|state)|artist|asctime|audio|auto|avoice|away(msg|time)?|banmask|batteryp?|beta|bit(rate|s)|bname|bnick|boldify|builddate|bw(downb?|name|recb?|sentb?|speed|upb?)|cal(ias|ler)|cancel|cb|cd|chan(modes|types)?|cid|clevel|cmd(box|line)|com(char|err|ment|pact)|cpu(cache|count|ident|load|mhz|name|vendor)|cr(eq|lf)?|ctimer?|ctrlenter|day(light)?|dbu(h|w)|dccignore|dccport|ddename|debug|devent|did|disk(free|total)|dlevel|dname|dock(panels)?|dotnet|download(err)?|dqwindow|ebeeps|email(addr)?|error|event(id|parms)?|exiting|false|fe(of|rr)|filename|filtered|find(dirn|filen)|flinen|frequency|fromeditbox|full(address|date|name|screen|title)|genre|getdir|gfx(ram)?|globalidle|gmt|halted|highlight|hnick|host|hotline(pos)?|ia(ddress|l)|ident|idle|ifmatch2?|ignore|in(midi(.(pos|length|fname|pause))?|mode|mp3|paste|song(.(pos|length|fname|pause))?|wave(.(pos|length|fname|pause))?|who)|ip|is(admin|id|wine)|kblayout|key(char|rpt|val)|knick|lactive(cid|wid)?|lag|layer|leftwin(cid|wid)?|length|lf|locked|log(dir|stamp(fmt)?)|lquitmsg|ltimer|maddress|matchkey|max(lenl|lenm|lens)|me|mem(freep?|total)|menu(bar|context|type)?|mididir|mircdir([^\\s,)]+)?|mircexe|mircini|mnick|modefirst|modelast|modespl|motherboard|mouse(.(x|y||mx|my|dx|dy|cx|cy|win|lb|key))?|mp3dir|msg(stamp|tags|x)|muted|mversion|naddress|nick(column|mode)?|network|newnick|no(tify)?|null|numeric|ok|online(server|total)?|op?nick|os(bits|build|edition|idle|installdate|major|minor|name|servicepack|version)?|parms|parse(line|type|utf)|passivedcc|pcre|percent(l|p)|pi|play(count|er(handle)?)|pnick|port(able)?|position|prefix(ctcp|emote|sys|user)?|progress|prop|protect|quickconnect|quitmessage|raddress|randomcolors|rating|raw(bytes|msgx?)|readn|realname|regerrstr|remote|result|screen(b|hz?|w)?|script(dir([^\\s,)]+)?|line|s)?|server(ip|target)?|sfstate|show|signal|site|size|snicks|snotify|sock(err|br|name)|song(path)?|sreq|ssl(cert((remote)?sha(1|256)|valid)|(lib)?dll|ready|version)?|starting|status(bar)?|stripped|switchbar|target|tempfn|ticks|time(out|stamp(fmt)?|zone)|tips|title(bar)?|toolbar|topic|totaltracks|track|treebar|true|ulevel|up(days|dating|hours|mins)|url|user(mode|name)|v1|v2|vcmd(stat|ver)|version|volume(b|p)?|vnick|wavedir|wid|wildsite|window|year|yes|ziperr)(?=\\s|\\)|,)"
531
+ },
532
+ {
533
+ "match": "(?\u003c=\\s|\\(|\\,|\\.|^)(\\$\\$?~?(?:\\?(?:[^\\s=]+)?|s?dir|hfile))(?:(=)(\"(?:[^\"])*\"))?(?=\\s|\\)|,)",
534
+ "captures": {
535
+ "1": {
536
+ "name": "keyword.other.identifier.mrc"
537
+ },
538
+ "2": {
539
+ "name": "keyword.operator.mrc"
540
+ },
541
+ "3": {
542
+ "name": "string.quoted.double.mrc"
543
+ }
544
+ }
566
545
  },
567
546
  {
568
- "include": "#identifiers-content"
547
+ "name": "keyword.other.identifier.mrc",
548
+ "match": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)(\\=\\$\\$?~?nick)(?=\\b)"
569
549
  },
570
550
  {
571
- "include": "#identifiers-iif-recurse"
551
+ "name": "support.function.name.mrc",
552
+ "match": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)(\\$\\$?~?[^\\s(),]+)(?=\\b)"
572
553
  }
573
554
  ]
574
555
  },
575
- "identifiers-iif-recurse": {
556
+ "identifiers_params": {
576
557
  "patterns": [
577
558
  {
578
- "begin": "(\\()",
579
- "end": "(\\))",
559
+ "begin": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)(\\$\\$?~?(\\+|abook|a?cos|abs|date|add(ress|tok(cs)?)|adilang|admnick|agent|alias|and|ansi2mirc|aop|asc(time)?|a?sin|a?tan|avoice|banlist|base|bfind|bindip|bit(off|on)|boldify|bvar|bytes|calias|cb|ceil|chan(nel)?|chat|chr|click|cnick|colou?r|com(call|chan|press|val)?|cosh?|count(cs)?|cpuload|crc|ctime|date|dccignore|dde|decode|decompress|decrypt|deltok|dialog|did(reg|tok|wm)?|disk(menu)?|dll(call)?|dns|dockpanels|download|duration|editbox(history)?|emoticons|encode|encodingmenu|encrypt|envvar|eval(next)?|eventtarget|exec|exists|fgetc|file|find(dir|file|tok(cs)?)|fline|floor|font|fopen|fread|fserve?|get(dir|dot|tok)?|gfx(ram)?|gmt|group|hash|height|hexcolor|hfind|hget|highlight|hmac|hmatch|hnick|hotlink|hotp|hregex|hypot|ial(chan)?|ibl|iel|ignore|iil|inellipse|ini(ck|topic)?|inpoly|input|in(round)?rect|insert|instok|int(ersect)?|invitemenu|iptype|iql|ircv3caps|is(alias|bit|dde|dir|file|lower|tok(cs)?|upper|utf)|keylocked|left|len|level|line(height|s)?|link|lock|lo(f|g(10)?)|long(fn|ip)|loop|lower|maddress|mask|matchtok(cs)?|md5|menuicon|mid|mk(log|nick)?fn|mode|mp3|msfile|msgtags|nadmnick|(nh)?nick|no(file|p?nick|t(ags|ify)?|path|qt)?|numtok|nvnick|ocolor|onpoly|op?nick|ord?|pic|play|plugins|portfree|pos(cs)?|powmod|prefix(emote|user)|puttok|qt|query|r(ands?|ead(ini)?|eg(ex|ml(ex)?|sub(ex)?)|em(ove(cs)?|tok(cs)?)|eplace(cs|x(cs)?)?|eptok(cs)?|gb|ight|ound|nick)?|samepath|scid|scon|screen(b|hz?|shot|w)?|script|sdir|send|server(vars)?|sfile|sha(1|2|256|384|512)|shortfn|sinh|slapsmenu|sline|snick|sock|sorttok(cs)?|sound|speak|spellcheck|sqrt|statusbar|str(ip)?|style|submenu|sysdir|tanh|timer|tip|token|toolbar|topicbox|totp|trust|ulist|unsafe|upper|uptime|url(get)?|utf(de|en)code|var|vc(md)?|vol|width|wildtok(cs)?|window|wmiquery|wrap|xor|zip))\\(",
560
+ "end": "(?i)\\)(?:\\.([^\\s|\\)|,]+))?",
580
561
  "patterns": [
581
562
  {
582
- "include": "#identifiers-iif-content"
583
- },
584
- {
585
- "include": "#identifiers-iif-recurse"
563
+ "include": "#parameters"
586
564
  }
587
565
  ],
588
566
  "beginCaptures": {
589
567
  "1": {
590
- "name": "punctuation.bracket.round.begin.mrc"
568
+ "name": "keyword.other.identifier.mrc"
591
569
  }
592
570
  },
593
571
  "endCaptures": {
594
572
  "1": {
595
- "name": "punctuation.bracket.round.end.mrc"
573
+ "name": "keyword.other.identifier.property.mrc"
596
574
  }
597
575
  }
598
- }
599
- ]
600
- },
601
- "identifiers-recurse": {
602
- "patterns": [
576
+ },
603
577
  {
604
- "begin": "(\\()",
605
- "end": "(\\))",
578
+ "begin": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)(\\$\\$?~?calc)\\(",
579
+ "end": "(?i)\\)(?:\\.([^\\s|\\)|,]+))?",
606
580
  "patterns": [
607
581
  {
608
- "include": "#identifiers-content"
582
+ "include": "#parameters"
609
583
  },
610
584
  {
611
- "include": "#identifiers-recurse"
585
+ "include": "#calc_content"
612
586
  }
613
587
  ],
614
588
  "beginCaptures": {
615
589
  "1": {
616
- "name": "punctuation.bracket.round.begin.mrc"
590
+ "name": "keyword.other.identifier.mrc"
617
591
  }
618
592
  },
619
593
  "endCaptures": {
620
594
  "1": {
621
- "name": "punctuation.bracket.round.end.mrc"
595
+ "name": "keyword.other.identifier.property.mrc"
622
596
  }
623
597
  }
624
- }
625
- ]
626
- },
627
- "keywords": {
628
- "patterns": [
598
+ },
629
599
  {
630
- "match": "(?:^|(?\u003c=[|{)]|else)\\s)\\s*(/*!?(?i:break|continue|goto|halt(?:def)?|return))\\b",
631
- "captures": {
600
+ "begin": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)(\\$\\$?~?iif)\\(",
601
+ "end": "(?i)\\)(?:\\.([^\\s|\\)|,]+))?",
602
+ "patterns": [
603
+ {
604
+ "include": "#conditionals_content"
605
+ },
606
+ {
607
+ "include": "#parameters"
608
+ }
609
+ ],
610
+ "beginCaptures": {
632
611
  "1": {
633
- "name": "keyword.control.flow.mrc"
612
+ "name": "keyword.other.identifier.mrc"
613
+ }
614
+ },
615
+ "endCaptures": {
616
+ "1": {
617
+ "name": "keyword.other.identifier.property.mrc"
634
618
  }
635
619
  }
636
- }
637
- ]
638
- },
639
- "labels": {
640
- "patterns": [
641
- {
642
- "name": "entity.name.section.label.mrc",
643
- "match": "(?:^|(?\u003c=[|{)]|else)\\s)\\s*:\\w+"
644
- }
645
- ]
646
- },
647
- "punctuation": {
648
- "patterns": [
649
- {
650
- "name": "punctuation.separator.command.mrc",
651
- "match": "(?\u003c=\\s)\\|(?=\\s)"
652
620
  },
653
621
  {
654
- "name": "punctuation.bracket.square.begin.mrc",
655
- "match": "(?:^|(?\u003c=\\s))\\[(?=\\s)"
656
- },
657
- {
658
- "name": "punctuation.bracket.square.end.mrc",
659
- "match": "(?\u003c=\\s)\\](?:(?=\\s)|$)"
660
- },
661
- {
662
- "name": "meta.block.mrc",
663
- "begin": "(?\u003c=\\s)({)(?:(?=\\s)|$)",
664
- "end": "(?:^|(?\u003c=\\s))(})(?:(?=\\s)|$)",
622
+ "begin": "(?\u003c=\\s|\\(!|\\(|\\,|\\.|^)(\\$\\$?~?[^\\s(),]+)\\(",
623
+ "end": "(?i)\\)(?:\\.([^\\s|\\)|,]+))?",
665
624
  "patterns": [
666
625
  {
667
- "include": "$self"
626
+ "include": "#parameters"
668
627
  }
669
628
  ],
670
629
  "beginCaptures": {
671
630
  "1": {
672
- "name": "punctuation.bracket.curly.begin.mrc"
631
+ "name": "support.function.name.mrc"
673
632
  }
674
633
  },
675
634
  "endCaptures": {
676
635
  "1": {
677
- "name": "punctuation.bracket.curly.end.mrc"
636
+ "name": "keyword.other.identifier.property.mrc"
678
637
  }
679
638
  }
680
639
  }
681
640
  ]
682
641
  },
683
- "statements": {
642
+ "menu": {
684
643
  "patterns": [
685
644
  {
686
- "name": "meta.conditional.statement.mrc",
687
- "begin": "(?ix:(?:^|(?\u003c=[{}]\\s))\\s*(if|while)\\s+(\\() | (?:^|(?\u003c=}\\s))\\s*(elseif)\\s+(\\())",
688
- "end": "(\\))",
645
+ "name": "meta.menu.code.mrc",
646
+ "begin": "(?i)^(menu)\\x20+((?:status|channel|query|nicklist|menubar|(?:channel)?link|@[^\\x20,]+|\\*)(?:,(?:status|channel|query|nicklist|menubar|(?:channel)?link|@[^\\x20,]+))*|\\*)\\x20+{",
647
+ "end": "(?i)(?=\\z|(?:^(?:on|raw|ctcp|dialog|\\#[^\\s]+|alias|menu)\\b))|}$",
689
648
  "patterns": [
690
649
  {
691
- "include": "#statements-content"
692
- },
693
- {
694
- "include": "#statements-recurse"
650
+ "include": "#menu_content"
695
651
  }
696
652
  ],
697
653
  "beginCaptures": {
698
654
  "1": {
699
- "name": "keyword.control.conditional.mrc"
655
+ "name": "storage.type.menu.mrc"
700
656
  },
701
657
  "2": {
702
- "name": "punctuation.bracket.round.begin.mrc"
703
- },
704
- "3": {
705
- "name": "keyword.control.conditional.mrc"
706
- },
707
- "4": {
708
- "name": "punctuation.bracket.round.begin.mrc"
709
- }
710
- },
711
- "endCaptures": {
712
- "1": {
713
- "name": "punctuation.bracket.round.end.mrc"
714
- }
715
- }
716
- },
717
- {
718
- "match": "(?i)(?:^|(?\u003c=}\\s))\\s*(else)(?=\\s)",
719
- "captures": {
720
- "1": {
721
- "name": "keyword.control.conditional.mrc"
658
+ "name": "storage.modifier.function.mrc"
722
659
  }
723
660
  }
724
661
  }
725
662
  ]
726
663
  },
727
- "statements-content": {
664
+ "menu_content": {
728
665
  "patterns": [
729
666
  {
730
667
  "include": "#comments"
731
668
  },
732
669
  {
733
- "include": "#identifiers"
734
- },
735
- {
736
- "include": "#variables"
670
+ "include": "#parameters"
737
671
  },
738
672
  {
739
- "include": "#constants"
740
- },
741
- {
742
- "include": "#comparison-operators"
743
- }
744
- ]
745
- },
746
- "statements-recurse": {
747
- "patterns": [
748
- {
749
- "begin": "(\\()",
750
- "end": "(\\))",
673
+ "begin": "(?:^\\x20*|\\G)\\x20*(?:\\.+)?((?:mouse|(?:s|d(?:r|m)?|u|r|lb|m)click)|leave|drop)(?:\\x20*:\\x20*)?",
674
+ "end": "(?=\\z|\\x20}|$)",
751
675
  "patterns": [
752
676
  {
753
- "include": "#statements-content"
754
- },
755
- {
756
- "include": "#statements-recurse"
677
+ "include": "#code_content"
757
678
  }
758
679
  ],
759
680
  "beginCaptures": {
760
681
  "1": {
761
- "name": "punctuation.bracket.round.begin.mrc"
762
- }
763
- },
764
- "endCaptures": {
765
- "1": {
766
- "name": "punctuation.bracket.round.end.mrc"
682
+ "name": "keyword.other.menu.item.mrc"
767
683
  }
768
684
  }
769
- }
770
- ]
771
- },
772
- "strings": {
773
- "patterns": [
685
+ },
774
686
  {
775
- "name": "string.quoted.double.mrc",
776
- "match": "(\").*?(\")",
777
- "captures": {
778
- "1": {
779
- "name": "punctuation.definition.string.begin.mrc"
687
+ "begin": "^\\x20*",
688
+ "end": "(?=\\z|\\x20}|$)",
689
+ "patterns": [
690
+ {
691
+ "include": "#parameters"
780
692
  },
781
- "2": {
782
- "name": "punctuation.definition.string.end.mrc"
693
+ {
694
+ "begin": "(?\u003c=:|{)",
695
+ "end": "(?=\\z|\\x20}|$)",
696
+ "patterns": [
697
+ {
698
+ "include": "#code_content"
699
+ }
700
+ ]
783
701
  }
784
- }
702
+ ]
785
703
  }
786
704
  ]
787
705
  },
788
- "variable-assignments": {
706
+ "parameters": {
789
707
  "patterns": [
790
708
  {
791
- "match": "(?i)(?:(?:^|(?\u003c=[|{)]|else)\\s)\\s*((/*)!?var(\\s-g)?)?|(,)\\s+)\\s*((%)\\w+)(?:\\s+(=)\\s+)?",
792
- "captures": {
793
- "1": {
794
- "name": "storage.type.mrc"
795
- },
796
- "2": {
797
- "name": "punctuation.definition.command.mrc"
798
- },
799
- "3": {
800
- "name": "punctuation.separator.delimiter.mrc"
801
- },
802
- "4": {
803
- "name": "variable.other.normal.mrc"
804
- },
805
- "5": {
806
- "name": "variable.global.set.mrc"
807
- },
808
- "6": {
809
- "name": "meta.punctuation.definition.variable.other.normal.mrc"
810
- },
811
- "7": {
812
- "name": "keyword.operator.assignment.mrc"
813
- }
814
- }
709
+ "include": "#variables"
815
710
  },
816
711
  {
817
- "match": "(?i)(?:^|(?\u003c=[|{)]|else)\\s)\\s*((/*)set)(?:\\s+\\-[a-z]+)?\\s+((%)\\w+)\\s",
818
- "captures": {
819
- "1": {
820
- "name": "storage.type.mrc"
821
- },
822
- "2": {
823
- "name": "punctuation.definition.command.mrc"
824
- },
825
- "3": {
826
- "name": "variable.other.normal.mrc"
827
- },
828
- "4": {
829
- "name": "meta.punctuation.definition.variable.other.normal.mrc"
830
- }
831
- }
712
+ "include": "#identifiers"
713
+ },
714
+ {
715
+ "include": "#constants"
716
+ }
717
+ ]
718
+ },
719
+ "switches": {
720
+ "patterns": [
721
+ {
722
+ "name": "keyword.other.switch.mrc",
723
+ "match": "(?\u003c=\\x20)[-+][[:alnum:]]+(?=\\s)"
832
724
  }
833
725
  ]
834
726
  },
@@ -836,21 +728,11 @@
836
728
  "patterns": [
837
729
  {
838
730
  "name": "variable.other.normal.mrc",
839
- "match": "(%)\\w+",
840
- "captures": {
841
- "1": {
842
- "name": "meta.punctuation.definition.variable.other.normal.mrc"
843
- }
844
- }
731
+ "match": "(?\u003c![^(,\\x20!])(%)[^\\x20),]+"
845
732
  },
846
733
  {
847
734
  "name": "variable.other.binary.mrc",
848
- "match": "(\u0026)\\w+",
849
- "captures": {
850
- "1": {
851
- "name": "meta.punctuation.definition.variable.other.binary.mrc"
852
- }
853
- }
735
+ "match": "(?\u003c![^(,\\x20!])(\u0026)[^\\x20),]+"
854
736
  }
855
737
  ]
856
738
  }