@@ -43,8 +43,10 @@ function either(...args) {
4343
4444/** @type LanguageFn */
4545export default function ( hljs ) {
46- const HASH_COMMENT_MODE = hljs . COMMENT ( '// ' , / $ / ) ;
46+ const HASH_COMMENT_MODE = hljs . COMMENT ( '``` ' , '```' ) ;
4747
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
4850 const EVAL_FUNCTIONS = [
4951 "abs" ,
5052 "acos" ,
@@ -63,6 +65,7 @@ export default function(hljs) {
6365 "cosh" ,
6466 "exact" ,
6567 "exp" ,
68+ "false" ,
6669 "floor" ,
6770 "hypot" ,
6871 "if" ,
@@ -73,10 +76,17 @@ export default function(hljs) {
7376 "isnull" ,
7477 "isnum" ,
7578 "isstr" ,
79+ "json_object" ,
80+ "json_array" ,
81+ "json_extract" ,
82+ "json_keys" ,
83+ "json_set" ,
84+ "json_valid" ,
7685 "len" ,
7786 "like" ,
78- "ln" ,
7987 "log" ,
88+ "lookup" ,
89+ "ln" ,
8090 "lower" ,
8191 "ltrim" ,
8292 "match" ,
@@ -90,6 +100,7 @@ export default function(hljs) {
90100 "mvfind" ,
91101 "mvindex" ,
92102 "mvjoin" ,
103+ "mvmap" ,
93104 "mvrange" ,
94105 "mvsort" ,
95106 "mvzip" ,
@@ -123,45 +134,49 @@ export default function(hljs) {
123134 "tonumber" ,
124135 "tostring" ,
125136 "trim" ,
137+ "true" ,
126138 "typeof" ,
127139 "upper" ,
128140 "urldecode" ,
129141 "validate"
130142 ] ;
131143
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
132146 const TRANSFORMING_FUNCTIONS = [
133147 "avg" ,
134148 "count" ,
135149 "distinct_count" ,
150+ "earliest" ,
151+ "earliest_time" ,
136152 "estdc" ,
137153 "estdc_error" ,
138- "eval" ,
154+ "first" ,
155+ "last" ,
156+ "latest" ,
157+ "latest_time" ,
158+ "list" ,
139159 "max" ,
140160 "mean" ,
141161 "median" ,
142162 "min" ,
143163 "mode" ,
144164 "percentile" ,
165+ "per_day" ,
166+ "per_hour" ,
167+ "per_minute" ,
168+ "per_second" ,
145169 "range" ,
170+ "rate" ,
171+ "rate_avg" ,
172+ "rate_sum" ,
146173 "stdev" ,
147174 "stdevp" ,
148175 "sum" ,
149176 "sumsq" ,
150- "var" ,
151- "varp" ,
152- "first" ,
153- "last" ,
154- "list" ,
155177 "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"
165180 ] ;
166181
167182 const FUNCTIONS = [
@@ -177,7 +192,8 @@ export default function(hljs) {
177192 }
178193 } ;
179194
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
181197 const BUILT_IN = [
182198 "abstract" ,
183199 "accum" ,
@@ -187,32 +203,37 @@ export default function(hljs) {
187203 "analyzefields" ,
188204 "anomalies" ,
189205 "anomalousvalue" ,
206+ "anomalydetection" ,
190207 "append" ,
191208 "appendcols" ,
192209 "appendpipe" ,
193210 "arules" ,
194211 "associate" ,
195212 "audit" ,
196213 "autoregress" ,
214+ "awssnsalert" ,
215+ "bin" ,
197216 "bucket" ,
198217 "bucketdir" ,
218+ "cefout" ,
199219 "chart" ,
200220 "cluster" ,
221+ "cofilter" ,
201222 "collect" ,
202223 "concurrency" ,
203224 "contingency" ,
204225 "convert" ,
205226 "correlate" ,
206- "crawl " ,
227+ "ctable " ,
207228 "datamodel" ,
229+ "datamodelsimple" ,
208230 "dbinspect" ,
209231 "dbxquery" ,
210- "dbxlookup" ,
211232 "dedup" ,
212233 "delete" ,
213234 "delta" ,
214235 "diff" ,
215- "dispatch " ,
236+ "entitymerge " ,
216237 "erex" ,
217238 "eval" ,
218239 "eventcount" ,
@@ -221,7 +242,6 @@ export default function(hljs) {
221242 "fieldformat" ,
222243 "fields" ,
223244 "fieldsummary" ,
224- "file" ,
225245 "filldown" ,
226246 "fillnull" ,
227247 "findtypes" ,
@@ -231,12 +251,15 @@ export default function(hljs) {
231251 "from" ,
232252 "gauge" ,
233253 "gentimes" ,
254+ "geom" ,
255+ "geomfilter" ,
234256 "geostats" ,
235257 "head" ,
236258 "highlight" ,
237259 "history" ,
238- "input " ,
260+ "iconify " ,
239261 "inputcsv" ,
262+ "inputintelligence" ,
240263 "inputlookup" ,
241264 "iplocation" ,
242265 "join" ,
@@ -250,8 +273,13 @@ export default function(hljs) {
250273 "makemv" ,
251274 "makeresults" ,
252275 "map" ,
276+ "mcollect" ,
253277 "metadata" ,
254278 "metasearch" ,
279+ "meventcollect" ,
280+ "mpreview" ,
281+ "msearch" ,
282+ "mstats" ,
255283 "multikv" ,
256284 "multisearch" ,
257285 "mvcombine" ,
@@ -266,11 +294,13 @@ export default function(hljs) {
266294 "predict" ,
267295 "rangemap" ,
268296 "rare" ,
297+ "redistribute" ,
269298 "regex" ,
270299 "relevancy" ,
271300 "reltime" ,
272301 "rename" ,
273302 "replace" ,
303+ "require" ,
274304 "rest" ,
275305 "return" ,
276306 "reverse" ,
@@ -291,6 +321,10 @@ export default function(hljs) {
291321 "sistats" ,
292322 "sitimechart" ,
293323 "sitop" ,
324+ "snowincident" ,
325+ "snowincidentstream" ,
326+ "snowevent" ,
327+ "snoweventstream" ,
294328 "sort" ,
295329 "spath" ,
296330 "stats" ,
@@ -300,6 +334,7 @@ export default function(hljs) {
300334 "tags" ,
301335 "tail" ,
302336 "timechart" ,
337+ "timewrap" ,
303338 "top" ,
304339 "transaction" ,
305340 "transpose" ,
@@ -309,13 +344,22 @@ export default function(hljs) {
309344 "typeahead" ,
310345 "typelearner" ,
311346 "typer" ,
347+ "union" ,
312348 "uniq" ,
313349 "untable" ,
350+ "walklex" ,
314351 "where" ,
315352 "x11" ,
316353 "xmlkv" ,
317354 "xmlunescape" ,
318355 "xpath" ,
356+ "xsDisplayConcept" ,
357+ "xsDisplayContext" ,
358+ "xsFindBestConcept" ,
359+ "xsListConcepts" ,
360+ "xsListContexts" ,
361+ "xsUpdateDDContext" ,
362+ "xsWhere" ,
319363 "xyseries"
320364 ] ;
321365
0 commit comments