123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /*
- Language: dsconfig
- Description: dsconfig batch configuration language for LDAP directory servers
- Contributors: Jacob Childress <jacobc@gmail.com>
- Category: enterprise, config
- */
- /** @type LanguageFn */
- function dsconfig(hljs) {
- const QUOTED_PROPERTY = {
- className: 'string',
- begin: /"/,
- end: /"/
- };
- const APOS_PROPERTY = {
- className: 'string',
- begin: /'/,
- end: /'/
- };
- const UNQUOTED_PROPERTY = {
- className: 'string',
- begin: /[\w\-?]+:\w+/,
- end: /\W/,
- relevance: 0
- };
- const VALUELESS_PROPERTY = {
- className: 'string',
- begin: /\w+(\-\w+)*/,
- end: /(?=\W)/,
- relevance: 0
- };
- return {
- keywords: 'dsconfig',
- contains: [
- {
- className: 'keyword',
- begin: '^dsconfig',
- end: /\s/,
- excludeEnd: true,
- relevance: 10
- },
- {
- className: 'built_in',
- begin: /(list|create|get|set|delete)-(\w+)/,
- end: /\s/,
- excludeEnd: true,
- illegal: '!@#$%^&*()',
- relevance: 10
- },
- {
- className: 'built_in',
- begin: /--(\w+)/,
- end: /\s/,
- excludeEnd: true
- },
- QUOTED_PROPERTY,
- APOS_PROPERTY,
- UNQUOTED_PROPERTY,
- VALUELESS_PROPERTY,
- hljs.HASH_COMMENT_MODE
- ]
- };
- }
- module.exports = dsconfig;
|