jboss-cli.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = function (hljs) {
  2. var PARAM = {
  3. begin: /[\w-]+ *=/, returnBegin: true,
  4. relevance: 0,
  5. contains: [{className: 'attr', begin: /[\w-]+/}]
  6. };
  7. var PARAMSBLOCK = {
  8. className: 'params',
  9. begin: /\(/,
  10. end: /\)/,
  11. contains: [PARAM],
  12. relevance : 0
  13. };
  14. var OPERATION = {
  15. className: 'function',
  16. begin: /:[\w\-.]+/,
  17. relevance: 0
  18. };
  19. var PATH = {
  20. className: 'string',
  21. begin: /\B(([\/.])[\w\-.\/=]+)+/,
  22. };
  23. var COMMAND_PARAMS = {
  24. className: 'params',
  25. begin: /--[\w\-=\/]+/,
  26. };
  27. return {
  28. aliases: ['wildfly-cli'],
  29. lexemes: '[a-z\-]+',
  30. keywords: {
  31. keyword: 'alias batch cd clear command connect connection-factory connection-info data-source deploy ' +
  32. 'deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls ' +
  33. 'patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias ' +
  34. 'undeploy unset version xa-data-source', // module
  35. literal: 'true false'
  36. },
  37. contains: [
  38. hljs.HASH_COMMENT_MODE,
  39. hljs.QUOTE_STRING_MODE,
  40. COMMAND_PARAMS,
  41. OPERATION,
  42. PATH,
  43. PARAMSBLOCK
  44. ]
  45. }
  46. };