File manager - Edit - /home/opticamezl/www/newok/sieve.tar
Back
sieve.js 0000644 00000010300 15175253002 0006207 0 ustar 00 // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/5/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror"], mod); else // Plain browser env mod(CodeMirror); })(function(CodeMirror) { "use strict"; CodeMirror.defineMode("sieve", function(config) { function words(str) { var obj = {}, words = str.split(" "); for (var i = 0; i < words.length; ++i) obj[words[i]] = true; return obj; } var keywords = words("if elsif else stop require"); var atoms = words("true false not"); var indentUnit = config.indentUnit; function tokenBase(stream, state) { var ch = stream.next(); if (ch == "/" && stream.eat("*")) { state.tokenize = tokenCComment; return tokenCComment(stream, state); } if (ch === '#') { stream.skipToEnd(); return "comment"; } if (ch == "\"") { state.tokenize = tokenString(ch); return state.tokenize(stream, state); } if (ch == "(") { state._indent.push("("); // add virtual angel wings so that editor behaves... // ...more sane in case of broken brackets state._indent.push("{"); return null; } if (ch === "{") { state._indent.push("{"); return null; } if (ch == ")") { state._indent.pop(); state._indent.pop(); } if (ch === "}") { state._indent.pop(); return null; } if (ch == ",") return null; if (ch == ";") return null; if (/[{}\(\),;]/.test(ch)) return null; // 1*DIGIT "K" / "M" / "G" if (/\d/.test(ch)) { stream.eatWhile(/[\d]/); stream.eat(/[KkMmGg]/); return "number"; } // ":" (ALPHA / "_") *(ALPHA / DIGIT / "_") if (ch == ":") { stream.eatWhile(/[a-zA-Z_]/); stream.eatWhile(/[a-zA-Z0-9_]/); return "operator"; } stream.eatWhile(/\w/); var cur = stream.current(); // "text:" *(SP / HTAB) (hash-comment / CRLF) // *(multiline-literal / multiline-dotstart) // "." CRLF if ((cur == "text") && stream.eat(":")) { state.tokenize = tokenMultiLineString; return "string"; } if (keywords.propertyIsEnumerable(cur)) return "keyword"; if (atoms.propertyIsEnumerable(cur)) return "atom"; return null; } function tokenMultiLineString(stream, state) { state._multiLineString = true; // the first line is special it may contain a comment if (!stream.sol()) { stream.eatSpace(); if (stream.peek() == "#") { stream.skipToEnd(); return "comment"; } stream.skipToEnd(); return "string"; } if ((stream.next() == ".") && (stream.eol())) { state._multiLineString = false; state.tokenize = tokenBase; } return "string"; } function tokenCComment(stream, state) { var maybeEnd = false, ch; while ((ch = stream.next()) != null) { if (maybeEnd && ch == "/") { state.tokenize = tokenBase; break; } maybeEnd = (ch == "*"); } return "comment"; } function tokenString(quote) { return function(stream, state) { var escaped = false, ch; while ((ch = stream.next()) != null) { if (ch == quote && !escaped) break; escaped = !escaped && ch == "\\"; } if (!escaped) state.tokenize = tokenBase; return "string"; }; } return { startState: function(base) { return {tokenize: tokenBase, baseIndent: base || 0, _indent: []}; }, token: function(stream, state) { if (stream.eatSpace()) return null; return (state.tokenize || tokenBase)(stream, state); }, indent: function(state, _textAfter) { var length = state._indent.length; if (_textAfter && (_textAfter[0] == "}")) length--; if (length <0) length = 0; return length * indentUnit; }, electricChars: "}" }; }); CodeMirror.defineMIME("application/sieve", "sieve"); }); sieve.min.js 0000644 00000003506 15175253002 0007003 0 ustar 00 (function(t){typeof exports=="object"&&typeof module=="object"?t(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)})(function(t){"use strict";t.defineMode("sieve",function(c){function f(n){for(var e={},i=n.split(" "),r=0;r<i.length;++r)e[i[r]]=!0;return e}var d=f("if elsif else stop require"),p=f("true false not"),k=c.indentUnit;function u(n,e){var i=n.next();if(i=="/"&&n.eat("*"))return e.tokenize=l,l(n,e);if(i==="#")return n.skipToEnd(),"comment";if(i=='"')return e.tokenize=v(i),e.tokenize(n,e);if(i=="(")return e._indent.push("("),e._indent.push("{"),null;if(i==="{")return e._indent.push("{"),null;if(i==")"&&(e._indent.pop(),e._indent.pop()),i==="}")return e._indent.pop(),null;if(i==","||i==";"||/[{}\(\),;]/.test(i))return null;if(/\d/.test(i))return n.eatWhile(/[\d]/),n.eat(/[KkMmGg]/),"number";if(i==":")return n.eatWhile(/[a-zA-Z_]/),n.eatWhile(/[a-zA-Z0-9_]/),"operator";n.eatWhile(/\w/);var r=n.current();return r=="text"&&n.eat(":")?(e.tokenize=h,"string"):d.propertyIsEnumerable(r)?"keyword":p.propertyIsEnumerable(r)?"atom":null}function h(n,e){return e._multiLineString=!0,n.sol()?(n.next()=="."&&n.eol()&&(e._multiLineString=!1,e.tokenize=u),"string"):(n.eatSpace(),n.peek()=="#"?(n.skipToEnd(),"comment"):(n.skipToEnd(),"string"))}function l(n,e){for(var i=!1,r;(r=n.next())!=null;){if(i&&r=="/"){e.tokenize=u;break}i=r=="*"}return"comment"}function v(n){return function(e,i){for(var r=!1,o;(o=e.next())!=null&&!(o==n&&!r);)r=!r&&o=="\\";return r||(i.tokenize=u),"string"}}return{startState:function(n){return{tokenize:u,baseIndent:n||0,_indent:[]}},token:function(n,e){return n.eatSpace()?null:(e.tokenize||u)(n,e)},indent:function(n,e){var i=n._indent.length;return e&&e[0]=="}"&&i--,i<0&&(i=0),i*k},electricChars:"}"}}),t.defineMIME("application/sieve","sieve")}); sieve.min.js.gz 0000644 00000001547 15175253002 0007425 0 ustar 00 � uUێ�6}�W���lh�}��(�E�h�i[�m�4^��I��6����u��8/��������N�2�;��[Af?���XWJ f�/��5'�U9]+�-�W)K� �0W�05����bԻf�Wڻ��N$�l�}�m��p9��d��J�A>eUI��Y�:�]С=��8��^�h�b=|�\c�7��$vF�n��:(�\93@a�2�U��~v�����Vk���2��*�g�x�L�9����{zB��� ��p���>�jm�8�4P:#����#��kAX{hOJӫ��=WRB����"�3G��+�\�� �V:(�����댣�ԜN���� ��P\������;IPT�{��VV ]�H����7������_�-hs��� 8��;��9\�͆oP��0pT:�Ƽ>�&�^��A���&ۆ(��ߏ��ߞ�tuڑr�tO_]��yĸ�/��*0����j�%��w��:H+kI����X)�ѫ��M����πQ�Gqo彮Nd�]N�� �������6�3'�|֚��];_�r�r��P��ڨr�:(M�qŇv�����w����Ic� '���Q��$%_�� :���Ǹ9�וf���a��7��$l��8�8�m�`�+Θmg�)�xg)96Jz�4]jF"�h/~K��� u!`=s#� csn�Ԍ�-�h��2f�����8�������T�.���%����ȩ\�J쒒�q����E�mӈ�n0�i�V�x4i���ֺ=�5ư"�A��j��z�m�cj���1����;6�rJ�����2���x�<<�sH�"Wi�c����_,�`���1H�F
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings