Initial commit.

Signed-off-by: Andreas Widen <aw@luflow.net>
This commit is contained in:
Andreas Widen 2026-07-27 17:57:03 +02:00
commit a4a5c7daa5
Signed by: hfsoulz
GPG key ID: 5B85F9B5F576A667
1389 changed files with 241399 additions and 0 deletions

View file

@ -0,0 +1,64 @@
/*! `brainfuck` grammar compiled for Highlight.js 11.11.1 */
(function(){
var hljsGrammar = (function () {
'use strict';
/*
Language: Brainfuck
Author: Evgeny Stepanischev <imbolk@gmail.com>
Website: https://esolangs.org/wiki/Brainfuck
*/
/** @type LanguageFn */
function brainfuck(hljs) {
const LITERAL = {
className: 'literal',
begin: /[+-]+/,
relevance: 0
};
return {
name: 'Brainfuck',
aliases: [ 'bf' ],
contains: [
hljs.COMMENT(
/[^\[\]\.,\+\-<> \r\n]/,
/[\[\]\.,\+\-<> \r\n]/,
{
contains: [
{
match: /[ ]+[^\[\]\.,\+\-<> \r\n]/,
relevance: 0
}
],
returnEnd: true,
relevance: 0
}
),
{
className: 'title',
begin: '[\\[\\]]',
relevance: 0
},
{
className: 'string',
begin: '[\\.,]',
relevance: 0
},
{
// this mode works as the only relevance counter
// it looks ahead to find the start of a run of literals
// so only the runs are counted as relevant
begin: /(?=\+\+|--)/,
contains: [ LITERAL ]
},
LITERAL
]
};
}
return brainfuck;
})();
hljs.registerLanguage('brainfuck', hljsGrammar);
})();