jboss-cli.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. Language: JBoss CLI
  3. Author: Raphaël Parrëe <rparree@edc4it.com>
  4. Description: language definition jboss cli
  5. Website: https://docs.jboss.org/author/display/WFLY/Command+Line+Interface
  6. Category: config
  7. */
  8. function jbossCli(hljs) {
  9. const PARAM = {
  10. begin: /[\w-]+ *=/,
  11. returnBegin: true,
  12. relevance: 0,
  13. contains: [
  14. {
  15. className: 'attr',
  16. begin: /[\w-]+/
  17. }
  18. ]
  19. };
  20. const PARAMSBLOCK = {
  21. className: 'params',
  22. begin: /\(/,
  23. end: /\)/,
  24. contains: [PARAM],
  25. relevance: 0
  26. };
  27. const OPERATION = {
  28. className: 'function',
  29. begin: /:[\w\-.]+/,
  30. relevance: 0
  31. };
  32. const PATH = {
  33. className: 'string',
  34. begin: /\B([\/.])[\w\-.\/=]+/
  35. };
  36. const COMMAND_PARAMS = {
  37. className: 'params',
  38. begin: /--[\w\-=\/]+/
  39. };
  40. return {
  41. name: 'JBoss CLI',
  42. aliases: ['wildfly-cli'],
  43. keywords: {
  44. $pattern: '[a-z\-]+',
  45. keyword: 'alias batch cd clear command connect connection-factory connection-info data-source deploy ' +
  46. 'deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls ' +
  47. 'patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias ' +
  48. 'undeploy unset version xa-data-source', // module
  49. literal: 'true false'
  50. },
  51. contains: [
  52. hljs.HASH_COMMENT_MODE,
  53. hljs.QUOTE_STRING_MODE,
  54. COMMAND_PARAMS,
  55. OPERATION,
  56. PATH,
  57. PARAMSBLOCK
  58. ]
  59. };
  60. }
  61. module.exports = jbossCli;