1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/highlight.js/lib/languages/jboss-cli.js

64 lines
1.5 KiB
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
/*
Language: JBoss CLI
Author: Raphaël Parrëe <rparree@edc4it.com>
Description: language definition jboss cli
Website: https://docs.jboss.org/author/display/WFLY/Command+Line+Interface
Category: config
*/
function jbossCli(hljs) {
const PARAM = {
begin: /[\w-]+ *=/,
returnBegin: true,
2023-12-18 13:12:25 +08:00
relevance: 0,
2024-01-16 21:26:16 +08:00
contains: [
{
className: 'attr',
begin: /[\w-]+/
}
]
2023-12-18 13:12:25 +08:00
};
2024-01-16 21:26:16 +08:00
const PARAMSBLOCK = {
2023-12-18 13:12:25 +08:00
className: 'params',
begin: /\(/,
end: /\)/,
contains: [PARAM],
2024-01-16 21:26:16 +08:00
relevance: 0
2023-12-18 13:12:25 +08:00
};
2024-01-16 21:26:16 +08:00
const OPERATION = {
2023-12-18 13:12:25 +08:00
className: 'function',
begin: /:[\w\-.]+/,
relevance: 0
};
2024-01-16 21:26:16 +08:00
const PATH = {
2023-12-18 13:12:25 +08:00
className: 'string',
2024-01-16 21:26:16 +08:00
begin: /\B([\/.])[\w\-.\/=]+/
2023-12-18 13:12:25 +08:00
};
2024-01-16 21:26:16 +08:00
const COMMAND_PARAMS = {
2023-12-18 13:12:25 +08:00
className: 'params',
2024-01-16 21:26:16 +08:00
begin: /--[\w\-=\/]+/
2023-12-18 13:12:25 +08:00
};
return {
2024-01-16 21:26:16 +08:00
name: 'JBoss CLI',
2023-12-18 13:12:25 +08:00
aliases: ['wildfly-cli'],
keywords: {
2024-01-16 21:26:16 +08:00
$pattern: '[a-z\-]+',
2023-12-18 13:12:25 +08:00
keyword: 'alias batch cd clear command connect connection-factory connection-info data-source deploy ' +
'deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls ' +
'patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias ' +
'undeploy unset version xa-data-source', // module
literal: 'true false'
},
contains: [
hljs.HASH_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
COMMAND_PARAMS,
OPERATION,
PATH,
PARAMSBLOCK
]
2024-01-16 21:26:16 +08:00
};
}
module.exports = jbossCli;