]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/dsconfig.js
Initial commit.
[flow-web.git] / static / highlight / languages / dsconfig.js
1 /*! `dsconfig` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: dsconfig
8 Description: dsconfig batch configuration language for LDAP directory servers
9 Contributors: Jacob Childress <jacobc@gmail.com>
10 Category: enterprise, config
11 */
12
13 /** @type LanguageFn */
14 function dsconfig(hljs) {
15 const QUOTED_PROPERTY = {
16 className: 'string',
17 begin: /"/,
18 end: /"/
19 };
20 const APOS_PROPERTY = {
21 className: 'string',
22 begin: /'/,
23 end: /'/
24 };
25 const UNQUOTED_PROPERTY = {
26 className: 'string',
27 begin: /[\w\-?]+:\w+/,
28 end: /\W/,
29 relevance: 0
30 };
31 const VALUELESS_PROPERTY = {
32 className: 'string',
33 begin: /\w+(\-\w+)*/,
34 end: /(?=\W)/,
35 relevance: 0
36 };
37
38 return {
39 keywords: 'dsconfig',
40 contains: [
41 {
42 className: 'keyword',
43 begin: '^dsconfig',
44 end: /\s/,
45 excludeEnd: true,
46 relevance: 10
47 },
48 {
49 className: 'built_in',
50 begin: /(list|create|get|set|delete)-(\w+)/,
51 end: /\s/,
52 excludeEnd: true,
53 illegal: '!@#$%^&*()',
54 relevance: 10
55 },
56 {
57 className: 'built_in',
58 begin: /--(\w+)/,
59 end: /\s/,
60 excludeEnd: true
61 },
62 QUOTED_PROPERTY,
63 APOS_PROPERTY,
64 UNQUOTED_PROPERTY,
65 VALUELESS_PROPERTY,
66 hljs.HASH_COMMENT_MODE
67 ]
68 };
69 }
70
71 return dsconfig;
72
73 })();
74
75 hljs.registerLanguage('dsconfig', hljsGrammar);
76 })();