]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/brainfuck.js
1 /*! `brainfuck` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: Evgeny Stepanischev <imbolk@gmail.com>
9 Website: https://esolangs.org/wiki/Brainfuck
12 /** @type LanguageFn */
13 function brainfuck(hljs
) {
24 /[^\[\]\.,\+\-<> \r\n]/,
25 /[\[\]\.,\+\-<> \r\n]/,
29 match: /[ ]+[^\[\]\.,\+\-<> \r\n]/,
48 // this mode works as the only relevance counter
49 // it looks ahead to find the start of a run of literals
50 // so only the runs are counted as relevant
63 hljs
.registerLanguage('brainfuck', hljsGrammar
);