File manager - Edit - /home/opticamezl/www/newok/turtle.tar
Back
turtle.js 0000644 00000011364 15175162342 0006434 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("turtle", function(config) { var indentUnit = config.indentUnit; var curPunc; function wordRegexp(words) { return new RegExp("^(?:" + words.join("|") + ")$", "i"); } var ops = wordRegexp([]); var keywords = wordRegexp(["@prefix", "@base", "a"]); var operatorChars = /[*+\-<>=&|]/; function tokenBase(stream, state) { var ch = stream.next(); curPunc = null; if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { stream.match(/^[^\s\u00a0>]*>?/); return "atom"; } else if (ch == "\"" || ch == "'") { state.tokenize = tokenLiteral(ch); return state.tokenize(stream, state); } else if (/[{}\(\),\.;\[\]]/.test(ch)) { curPunc = ch; return null; } else if (ch == "#") { stream.skipToEnd(); return "comment"; } else if (operatorChars.test(ch)) { stream.eatWhile(operatorChars); return null; } else if (ch == ":") { return "operator"; } else { stream.eatWhile(/[_\w\d]/); if(stream.peek() == ":") { return "variable-3"; } else { var word = stream.current(); if(keywords.test(word)) { return "meta"; } if(ch >= "A" && ch <= "Z") { return "comment"; } else { return "keyword"; } } var word = stream.current(); if (ops.test(word)) return null; else if (keywords.test(word)) return "meta"; else return "variable"; } } function tokenLiteral(quote) { return function(stream, state) { var escaped = false, ch; while ((ch = stream.next()) != null) { if (ch == quote && !escaped) { state.tokenize = tokenBase; break; } escaped = !escaped && ch == "\\"; } return "string"; }; } function pushContext(state, type, col) { state.context = {prev: state.context, indent: state.indent, col: col, type: type}; } function popContext(state) { state.indent = state.context.indent; state.context = state.context.prev; } return { startState: function() { return {tokenize: tokenBase, context: null, indent: 0, col: 0}; }, token: function(stream, state) { if (stream.sol()) { if (state.context && state.context.align == null) state.context.align = false; state.indent = stream.indentation(); } if (stream.eatSpace()) return null; var style = state.tokenize(stream, state); if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { state.context.align = true; } if (curPunc == "(") pushContext(state, ")", stream.column()); else if (curPunc == "[") pushContext(state, "]", stream.column()); else if (curPunc == "{") pushContext(state, "}", stream.column()); else if (/[\]\}\)]/.test(curPunc)) { while (state.context && state.context.type == "pattern") popContext(state); if (state.context && curPunc == state.context.type) popContext(state); } else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); else if (/atom|string|variable/.test(style) && state.context) { if (/[\}\]]/.test(state.context.type)) pushContext(state, "pattern", stream.column()); else if (state.context.type == "pattern" && !state.context.align) { state.context.align = true; state.context.col = stream.column(); } } return style; }, indent: function(state, textAfter) { var firstChar = textAfter && textAfter.charAt(0); var context = state.context; if (/[\]\}]/.test(firstChar)) while (context && context.type == "pattern") context = context.prev; var closing = context && firstChar == context.type; if (!context) return 0; else if (context.type == "pattern") return context.col; else if (context.align) return context.col + (closing ? 0 : 1); else return context.indent + (closing ? 0 : indentUnit); }, lineComment: "#" }; }); CodeMirror.defineMIME("text/turtle", "turtle"); }); turtle.min.js 0000644 00000004316 15175162342 0007215 0 ustar 00 (function(o){typeof exports=="object"&&typeof module=="object"?o(require("../../lib/codemirror")):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)})(function(o){"use strict";o.defineMode("turtle",function(v){var y=v.indentUnit,r;function f(n){return new RegExp("^(?:"+n.join("|")+")$","i")}var h=f([]),p=f(["@prefix","@base","a"]),x=/[*+\-<>=&|]/;function d(n,e){var t=n.next();if(r=null,t=="<"&&!n.match(/^[\s\u00a0=]/,!1))return n.match(/^[^\s\u00a0>]*>?/),"atom";if(t=='"'||t=="'")return e.tokenize=k(t),e.tokenize(n,e);if(/[{}\(\),\.;\[\]]/.test(t))return r=t,null;if(t=="#")return n.skipToEnd(),"comment";if(x.test(t))return n.eatWhile(x),null;if(t==":")return"operator";if(n.eatWhile(/[_\w\d]/),n.peek()==":")return"variable-3";var i=n.current();return p.test(i)?"meta":t>="A"&&t<="Z"?"comment":"keyword";var i=n.current();return h.test(i)?null:p.test(i)?"meta":"variable"}function k(n){return function(e,t){for(var i=!1,l;(l=e.next())!=null;){if(l==n&&!i){t.tokenize=d;break}i=!i&&l=="\\"}return"string"}}function c(n,e,t){n.context={prev:n.context,indent:n.indent,col:t,type:e}}function u(n){n.indent=n.context.indent,n.context=n.context.prev}return{startState:function(){return{tokenize:d,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()&&(e.context&&e.context.align==null&&(e.context.align=!1),e.indent=n.indentation()),n.eatSpace())return null;var t=e.tokenize(n,e);if(t!="comment"&&e.context&&e.context.align==null&&e.context.type!="pattern"&&(e.context.align=!0),r=="(")c(e,")",n.column());else if(r=="[")c(e,"]",n.column());else if(r=="{")c(e,"}",n.column());else if(/[\]\}\)]/.test(r)){for(;e.context&&e.context.type=="pattern";)u(e);e.context&&r==e.context.type&&u(e)}else r=="."&&e.context&&e.context.type=="pattern"?u(e):/atom|string|variable/.test(t)&&e.context&&(/[\}\]]/.test(e.context.type)?c(e,"pattern",n.column()):e.context.type=="pattern"&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return t},indent:function(n,e){var t=e&&e.charAt(0),i=n.context;if(/[\]\}]/.test(t))for(;i&&i.type=="pattern";)i=i.prev;var l=i&&t==i.type;return i?i.type=="pattern"?i.col:i.align?i.col+(l?0:1):i.indent+(l?0:y):0},lineComment:"#"}}),o.defineMIME("text/turtle","turtle")}); turtle.min.js.gz 0000644 00000001747 15175162342 0007641 0 ustar 00 � }UMs�6��W��Cn��3�Ia�;;9�K�����t N��I�������i�'I�� <�|U���5܊==�hWܕ��V)�w?0#`����yU�cn��+�C�A�.�l��u DԹ��ƻ����,H7��}勷a�Ҋ��6Ǜ�DԂ3�j��-9��6h�nl��rT ��Q�S7yV��69��h�.� &+n��!U�L>M����]���#87�� ��s�� ���j�K!K��ϥÕށ��w�AB K!w*\|<O>]^)vX�cԜ�-5R&0�#.b��N��($)��������.�mR�f�L-C9��'=Z�&WˏW�PHH�n��Rgpv8x�3�}1 �F��C��$�����b_'<2 �d�,�a@�%N�Hz�]� #��Z��k�s!!�� j��^�� S����;q��x`Kt)Y� 9����$_�B��D\sq�:����7�}ɵ2AV9��W�#P�����)���|��p��o��#X��u���=`>���@ �A�#%�EIb��������y�����6z��^�x��al�Şƾ���t]k5ՌJA�@�����z$����&Ȭ!ܑڗ��[�s�n�df�������*�No���k��@���RG�(%��b����E��|�fl:j��Ӭ�ec84C�hgk.��glx �B��T�ؤ;�^�A�j_Җ� ��L3䣶}��Yc�h�m�x��x�k>UP�D�}�u&�S 8���M�j���Xlq�l��d��ɾ3��6 �2�ѯ'Z��o��ɫ�|,*����)uj͘7��p�N�^�^@Ͻ[�]xh��oXf'H>�z\u��b�Ԡ?�D�.Ʀ/Z�f��x��BA���^姪�����/�gB�q��AG��fL��V���F��Ҍ�R�]OE�_�͵��6����Yt!"��J{�,�Y-m�k+�>@]9���\s���Z��wQ����O��?�
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings