[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/vendor/codemirror/mode/ebnf/ -> ebnf.min.js (source)

   1  !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("ebnf",(function(t){var a=0,r=1,c=0,n=1,i=2,o=null;return t.bracesMode&&(o=e.getMode(t,t.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(t,s){if(t){switch(0===s.stack.length&&('"'==t.peek()||"'"==t.peek()?(s.stringType=t.peek(),t.next(),s.stack.unshift(n)):t.match("/*")?(s.stack.unshift(c),s.commentType=a):t.match("(*")&&(s.stack.unshift(c),s.commentType=r)),s.stack[0]){case n:for(;s.stack[0]===n&&!t.eol();)t.peek()===s.stringType?(t.next(),s.stack.shift()):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return s.lhs?"property string":"string";case c:for(;s.stack[0]===c&&!t.eol();)s.commentType===a&&t.match("*/")||s.commentType===r&&t.match("*)")?(s.stack.shift(),s.commentType=null):t.match(/^.[^\*]*/);return"comment";case i:for(;s.stack[0]===i&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(".")||s.stack.shift();return"operator"}var m=t.peek();if(null!==o&&(s.braced||"{"===m)){null===s.localState&&(s.localState=e.startState(o));var f=o.token(t,s.localState),u=t.current();if(!f)for(var h=0;h<u.length;h++)"{"===u[h]?(0===s.braced&&(f="matchingbracket"),s.braced++):"}"===u[h]&&(s.braced--,0===s.braced&&(f="matchingbracket"));return f}switch(m){case"[":return t.next(),s.stack.unshift(i),"bracket";case":":case"|":case";":return t.next(),"operator";case"%":if(t.match("%%"))return"header";if(t.match(/[%][A-Za-z]+/))return"keyword";if(t.match(/[%][}]/))return"matchingbracket";break;case"/":if(t.match(/[\/][A-Za-z]+/))return"keyword";case"\\":if(t.match(/[\][a-z]+/))return"string-2";case".":if(t.match("."))return"atom";case"*":case"-":case"+":case"^":if(t.match(m))return"atom";case"$":if(t.match("$$"))return"builtin";if(t.match(/[$][0-9]+/))return"variable-3";case"<":if(t.match(/<<[a-zA-Z_]+>>/))return"builtin"}return t.match("//")?(t.skipToEnd(),"comment"):t.match("return")?"operator":t.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?t.match(/(?=[\(.])/)?"variable":t.match(/(?=[\s\n]*[:=])/)?"def":"variable-2":-1!=["[","]","(",")"].indexOf(t.peek())?(t.next(),"bracket"):(t.eatSpace()||t.next(),null)}}}})),e.defineMIME("text/x-ebnf","ebnf")}));


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer