tibi-docs/.yarn/unplugged/highlight.js-npm-9.18.5-571500f48d/node_modules/highlight.js/lib/languages/brainfuck.js
2022-11-02 06:40:25 +00:00

36 lines
690 B
JavaScript

module.exports = function(hljs){
var LITERAL = {
className: 'literal',
begin: '[\\+\\-]',
relevance: 0
};
return {
aliases: ['bf'],
contains: [
hljs.COMMENT(
'[^\\[\\]\\.,\\+\\-<> \r\n]',
'[\\[\\]\\.,\\+\\-<> \r\n]',
{
returnEnd: true,
relevance: 0
}
),
{
className: 'title',
begin: '[\\[\\]]',
relevance: 0
},
{
className: 'string',
begin: '[\\.,]',
relevance: 0
},
{
// this mode works as the only relevance counter
begin: /(?:\+\+|\-\-)/,
contains: [LITERAL]
},
LITERAL
]
};
};