@@ -43,8 +43,10 @@ function either(...args) {
43
43
44
44
/** @type LanguageFn */
45
45
export default function ( hljs ) {
46
- const HASH_COMMENT_MODE = hljs . COMMENT ( '// ' , / $ / ) ;
46
+ const HASH_COMMENT_MODE = hljs . COMMENT ( '``` ' , '```' ) ;
47
47
48
+ // List of evaluation functions from Splunk Enterprise 8.1.3 - Alphabetical list of functions
49
+ // https://docs.splunk.com/Documentation/Splunk/8.1.3/SearchReference/CommonEvalFunctions#Alphabetical_list_of_functions
48
50
const EVAL_FUNCTIONS = [
49
51
"abs" ,
50
52
"acos" ,
@@ -63,6 +65,7 @@ export default function(hljs) {
63
65
"cosh" ,
64
66
"exact" ,
65
67
"exp" ,
68
+ "false" ,
66
69
"floor" ,
67
70
"hypot" ,
68
71
"if" ,
@@ -73,10 +76,17 @@ export default function(hljs) {
73
76
"isnull" ,
74
77
"isnum" ,
75
78
"isstr" ,
79
+ "json_object" ,
80
+ "json_array" ,
81
+ "json_extract" ,
82
+ "json_keys" ,
83
+ "json_set" ,
84
+ "json_valid" ,
76
85
"len" ,
77
86
"like" ,
78
- "ln" ,
79
87
"log" ,
88
+ "lookup" ,
89
+ "ln" ,
80
90
"lower" ,
81
91
"ltrim" ,
82
92
"match" ,
@@ -90,6 +100,7 @@ export default function(hljs) {
90
100
"mvfind" ,
91
101
"mvindex" ,
92
102
"mvjoin" ,
103
+ "mvmap" ,
93
104
"mvrange" ,
94
105
"mvsort" ,
95
106
"mvzip" ,
@@ -123,45 +134,49 @@ export default function(hljs) {
123
134
"tonumber" ,
124
135
"tostring" ,
125
136
"trim" ,
137
+ "true" ,
126
138
"typeof" ,
127
139
"upper" ,
128
140
"urldecode" ,
129
141
"validate"
130
142
] ;
131
143
144
+ // List of statistical and charting functions from Splunk Enterprise 8.1.3 - Alphabetical list of functions
145
+ // https://docs.splunk.com/Documentation/Splunk/8.1.3/SearchReference/CommonEvalFunctions#Alphabetical_list_of_functions
132
146
const TRANSFORMING_FUNCTIONS = [
133
147
"avg" ,
134
148
"count" ,
135
149
"distinct_count" ,
150
+ "earliest" ,
151
+ "earliest_time" ,
136
152
"estdc" ,
137
153
"estdc_error" ,
138
- "eval" ,
154
+ "first" ,
155
+ "last" ,
156
+ "latest" ,
157
+ "latest_time" ,
158
+ "list" ,
139
159
"max" ,
140
160
"mean" ,
141
161
"median" ,
142
162
"min" ,
143
163
"mode" ,
144
164
"percentile" ,
165
+ "per_day" ,
166
+ "per_hour" ,
167
+ "per_minute" ,
168
+ "per_second" ,
145
169
"range" ,
170
+ "rate" ,
171
+ "rate_avg" ,
172
+ "rate_sum" ,
146
173
"stdev" ,
147
174
"stdevp" ,
148
175
"sum" ,
149
176
"sumsq" ,
150
- "var" ,
151
- "varp" ,
152
- "first" ,
153
- "last" ,
154
- "list" ,
155
177
"values" ,
156
- "earliest" ,
157
- "earliest_time" ,
158
- "latest" ,
159
- "latest_time" ,
160
- "per_day" ,
161
- "per_hour" ,
162
- "per_minute" ,
163
- "per_second" ,
164
- "rate"
178
+ "var" ,
179
+ "varp"
165
180
] ;
166
181
167
182
const FUNCTIONS = [
@@ -177,7 +192,8 @@ export default function(hljs) {
177
192
}
178
193
} ;
179
194
180
- // https://docs.splunk.com/Documentation/SplunkLight/7.3.6/References/Listofsearchcommands
195
+ // List of search command from Splunk Enterprise 8.1.3 - Search Commands
196
+ // https://docs.splunk.com/Documentation/Splunk/8.1.3/SearchReference/WhatsInThisManual
181
197
const BUILT_IN = [
182
198
"abstract" ,
183
199
"accum" ,
@@ -187,32 +203,37 @@ export default function(hljs) {
187
203
"analyzefields" ,
188
204
"anomalies" ,
189
205
"anomalousvalue" ,
206
+ "anomalydetection" ,
190
207
"append" ,
191
208
"appendcols" ,
192
209
"appendpipe" ,
193
210
"arules" ,
194
211
"associate" ,
195
212
"audit" ,
196
213
"autoregress" ,
214
+ "awssnsalert" ,
215
+ "bin" ,
197
216
"bucket" ,
198
217
"bucketdir" ,
218
+ "cefout" ,
199
219
"chart" ,
200
220
"cluster" ,
221
+ "cofilter" ,
201
222
"collect" ,
202
223
"concurrency" ,
203
224
"contingency" ,
204
225
"convert" ,
205
226
"correlate" ,
206
- "crawl " ,
227
+ "ctable " ,
207
228
"datamodel" ,
229
+ "datamodelsimple" ,
208
230
"dbinspect" ,
209
231
"dbxquery" ,
210
- "dbxlookup" ,
211
232
"dedup" ,
212
233
"delete" ,
213
234
"delta" ,
214
235
"diff" ,
215
- "dispatch " ,
236
+ "entitymerge " ,
216
237
"erex" ,
217
238
"eval" ,
218
239
"eventcount" ,
@@ -221,7 +242,6 @@ export default function(hljs) {
221
242
"fieldformat" ,
222
243
"fields" ,
223
244
"fieldsummary" ,
224
- "file" ,
225
245
"filldown" ,
226
246
"fillnull" ,
227
247
"findtypes" ,
@@ -231,12 +251,15 @@ export default function(hljs) {
231
251
"from" ,
232
252
"gauge" ,
233
253
"gentimes" ,
254
+ "geom" ,
255
+ "geomfilter" ,
234
256
"geostats" ,
235
257
"head" ,
236
258
"highlight" ,
237
259
"history" ,
238
- "input " ,
260
+ "iconify " ,
239
261
"inputcsv" ,
262
+ "inputintelligence" ,
240
263
"inputlookup" ,
241
264
"iplocation" ,
242
265
"join" ,
@@ -250,8 +273,13 @@ export default function(hljs) {
250
273
"makemv" ,
251
274
"makeresults" ,
252
275
"map" ,
276
+ "mcollect" ,
253
277
"metadata" ,
254
278
"metasearch" ,
279
+ "meventcollect" ,
280
+ "mpreview" ,
281
+ "msearch" ,
282
+ "mstats" ,
255
283
"multikv" ,
256
284
"multisearch" ,
257
285
"mvcombine" ,
@@ -266,11 +294,13 @@ export default function(hljs) {
266
294
"predict" ,
267
295
"rangemap" ,
268
296
"rare" ,
297
+ "redistribute" ,
269
298
"regex" ,
270
299
"relevancy" ,
271
300
"reltime" ,
272
301
"rename" ,
273
302
"replace" ,
303
+ "require" ,
274
304
"rest" ,
275
305
"return" ,
276
306
"reverse" ,
@@ -291,6 +321,10 @@ export default function(hljs) {
291
321
"sistats" ,
292
322
"sitimechart" ,
293
323
"sitop" ,
324
+ "snowincident" ,
325
+ "snowincidentstream" ,
326
+ "snowevent" ,
327
+ "snoweventstream" ,
294
328
"sort" ,
295
329
"spath" ,
296
330
"stats" ,
@@ -300,6 +334,7 @@ export default function(hljs) {
300
334
"tags" ,
301
335
"tail" ,
302
336
"timechart" ,
337
+ "timewrap" ,
303
338
"top" ,
304
339
"transaction" ,
305
340
"transpose" ,
@@ -309,13 +344,22 @@ export default function(hljs) {
309
344
"typeahead" ,
310
345
"typelearner" ,
311
346
"typer" ,
347
+ "union" ,
312
348
"uniq" ,
313
349
"untable" ,
350
+ "walklex" ,
314
351
"where" ,
315
352
"x11" ,
316
353
"xmlkv" ,
317
354
"xmlunescape" ,
318
355
"xpath" ,
356
+ "xsDisplayConcept" ,
357
+ "xsDisplayContext" ,
358
+ "xsFindBestConcept" ,
359
+ "xsListConcepts" ,
360
+ "xsListContexts" ,
361
+ "xsUpdateDDContext" ,
362
+ "xsWhere" ,
319
363
"xyseries"
320
364
] ;
321
365
0 commit comments