l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

dsconfig.js (1235B)


      1 /*
      2  Language: dsconfig
      3  Description: dsconfig batch configuration language for LDAP directory servers
      4  Contributors: Jacob Childress <jacobc@gmail.com>
      5  Category: enterprise, config
      6  */
      7 function dsconfig(hljs) {
      8   var QUOTED_PROPERTY = {
      9     className: 'string',
     10     begin: /"/, end: /"/
     11   };
     12   var APOS_PROPERTY = {
     13     className: 'string',
     14     begin: /'/, end: /'/
     15   };
     16   var UNQUOTED_PROPERTY = {
     17     className: 'string',
     18     begin: '[\\w-?]+:\\w+', end: '\\W',
     19     relevance: 0
     20   };
     21   var VALUELESS_PROPERTY = {
     22     className: 'string',
     23     begin: '\\w+-?\\w+', end: '\\W',
     24     relevance: 0
     25   };
     26 
     27   return {
     28     keywords: 'dsconfig',
     29     contains: [
     30       {
     31         className: 'keyword',
     32         begin: '^dsconfig', end: '\\s', excludeEnd: true,
     33         relevance: 10
     34       },
     35       {
     36         className: 'built_in',
     37         begin: '(list|create|get|set|delete)-(\\w+)', end: '\\s', excludeEnd: true,
     38         illegal: '!@#$%^&*()',
     39         relevance: 10
     40       },
     41       {
     42         className: 'built_in',
     43         begin: '--(\\w+)', end: '\\s', excludeEnd: true
     44       },
     45       QUOTED_PROPERTY,
     46       APOS_PROPERTY,
     47       UNQUOTED_PROPERTY,
     48       VALUELESS_PROPERTY,
     49       hljs.HASH_COMMENT_MODE
     50     ]
     51   };
     52 }
     53 
     54 module.exports = dsconfig;