%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /data/old/home/stash/atlassian-stash/static/bower/CodeMirror/mode/python/
Upload File :
Create Path :
Current File : //data/old/home/stash/atlassian-stash/static/bower/CodeMirror/mode/python/python-min.js

CodeMirror.defineMode("python",function(M,V){var C="error";function Q(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}var P=V.singleOperators||new RegExp("^[\\+\\-\\*/%&|\\^~<>!]");var R=V.singleDelimiters||new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]");var A=V.doubleOperators||new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))");var K=V.doubleDelimiters||new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))");var X=V.tripleDelimiters||new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))");var J=V.identifiers||new RegExp("^[_A-Za-z][_A-Za-z0-9]*");var E=V.hangingIndent||V.indentUnit;var F=Q(["and","or","not","is","in"]);var U=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield"];var S=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];var D={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]};var B={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};if(V.extra_keywords!=undefined){U=U.concat(V.extra_keywords)}if(V.extra_builtins!=undefined){S=S.concat(V.extra_builtins)}if(!!V.version&&parseInt(V.version,10)===3){U=U.concat(B.keywords);S=S.concat(B.builtins);var N=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}else{U=U.concat(D.keywords);S=S.concat(D.builtins);var N=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var L=Q(U);var G=Q(S);var W=null;function Z(g,f){if(g.sol()){var b=f.scopes[0].offset;if(g.eatSpace()){var d=g.indentation();if(d>b){W="indent"}else{if(d<b){W="dedent"}}return null}else{if(b>0){H(g,f)}}}if(g.eatSpace()){return null}var e=g.peek();if(e==="#"){g.skipToEnd();return"comment"}if(g.match(/^[0-9\.]/,false)){var c=false;if(g.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)){c=true}if(g.match(/^\d+\.\d*/)){c=true}if(g.match(/^\.\d+/)){c=true}if(c){g.eat(/J/i);return"number"}var a=false;if(g.match(/^0x[0-9a-f]+/i)){a=true}if(g.match(/^0b[01]+/i)){a=true}if(g.match(/^0o[0-7]+/i)){a=true}if(g.match(/^[1-9]\d*(e[\+\-]?\d+)?/)){g.eat(/J/i);a=true}if(g.match(/^0(?![\dx])/i)){a=true}if(a){g.eat(/L/i);return"number"}}if(g.match(N)){f.tokenize=T(g.current());return f.tokenize(g,f)}if(g.match(X)||g.match(K)){return null}if(g.match(A)||g.match(P)||g.match(F)){return"operator"}if(g.match(R)){return null}if(g.match(L)){return"keyword"}if(g.match(G)){return"builtin"}if(g.match(/^(self|cls)\b/)){return"variable-2"}if(g.match(J)){if(f.lastToken=="def"||f.lastToken=="class"){return"def"}return"variable"}g.next();return C}function T(a){while("rub".indexOf(a.charAt(0).toLowerCase())>=0){a=a.substr(1)}var c=a.length==1;var b="string";function d(f,e){while(!f.eol()){f.eatWhile(/[^'"\\]/);if(f.eat("\\")){f.next();if(c&&f.eol()){return b}}else{if(f.match(a)){e.tokenize=Z;return b}else{f.eat(/['"]/)}}}if(c){if(V.singleLineStringErrors){return C}else{e.tokenize=Z}}return b}d.isString=true;return d}function O(e,d,c){c=c||"py";var a=0;if(c==="py"){if(d.scopes[0].type!=="py"){d.scopes[0].offset=e.indentation();return }for(var b=0;b<d.scopes.length;++b){if(d.scopes[b].type==="py"){a=d.scopes[b].offset+M.indentUnit;break}}}else{if(e.match(/\s*($|#)/,false)){a=e.indentation()+E}else{a=e.column()+e.current().length}}d.scopes.unshift({offset:a,type:c})}function H(f,e,c){c=c||"py";if(e.scopes.length==1){return }if(e.scopes[0].type==="py"){var b=f.indentation();var d=-1;for(var a=0;a<e.scopes.length;++a){if(b===e.scopes[a].offset){d=a;break}}if(d===-1){return true}while(e.scopes[0].offset!==b){e.scopes.shift()}return false}else{if(c==="py"){e.scopes[0].offset=f.indentation();return false}else{if(e.scopes[0].type!=c){return true}e.scopes.shift();return false}}}function Y(e,c){W=null;var b=c.tokenize(e,c);var d=e.current();if(d==="."){b=e.match(J,false)?null:C;if(b===null&&c.lastStyle==="meta"){b="meta"}return b}if(d==="@"){return e.match(J,false)?"meta":C}if((b==="variable"||b==="builtin")&&c.lastStyle==="meta"){b="meta"}if(d==="pass"||d==="return"){c.dedent+=1}if(d==="lambda"){c.lambda=true}if((d===":"&&!c.lambda&&c.scopes[0].type=="py")||W==="indent"){O(e,c)}var a="[({".indexOf(d);if(a!==-1){O(e,c,"])}".slice(a,a+1))}if(W==="dedent"){if(H(e,c)){return C}}a="])}".indexOf(d);if(a!==-1){if(H(e,c,d)){return C}}if(c.dedent>0&&e.eol()&&c.scopes[0].type=="py"){if(c.scopes.length>1){c.scopes.shift()}c.dedent-=1}return b}var I={startState:function(a){return{tokenize:Z,scopes:[{offset:a||0,type:"py"}],lastStyle:null,lastToken:null,lambda:false,dedent:0}},token:function(d,b){var a=Y(d,b);b.lastStyle=a;var c=d.current();if(c&&a){b.lastToken=c}if(d.eol()&&b.lambda){b.lambda=false}return a},indent:function(a){if(a.tokenize!=Z){return a.tokenize.isString?CodeMirror.Pass:0}return a.scopes[0].offset},lineComment:"#",fold:"indent"};return I});CodeMirror.defineMIME("text/x-python","python");(function(){var A=function(B){return B.split(" ")};CodeMirror.defineMIME("text/x-cython",{name:"python",extra_keywords:A("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")})})();

Zerion Mini Shell 1.0