%PDF- %PDF-
| Direktori : /data/old/home/stash/atlassian-stash/static/bower/CodeMirror/mode/commonlisp/ |
| Current File : //data/old/home/stash/atlassian-stash/static/bower/CodeMirror/mode/commonlisp/commonlisp-min.js |
CodeMirror.defineMode("commonlisp",function(B){var I=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;var F=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;var C=/[^\s'`,@()\[\]";]/;var G;function E(K){var J;while(J=K.next()){if(J=="\\"){K.next()}else{if(!C.test(J)){K.backUp(1);break}}}return K.current()}function A(M,L){if(M.eatSpace()){G="ws";return null}if(M.match(F)){return"number"}var K=M.next();if(K=="\\"){K=M.next()}if(K=='"'){return(L.tokenize=D)(M,L)}else{if(K=="("){G="open";return"bracket"}else{if(K==")"||K=="]"){G="close";return"bracket"}else{if(K==";"){M.skipToEnd();G="ws";return"comment"}else{if(/['`,@]/.test(K)){return null}else{if(K=="|"){if(M.skipTo("|")){M.next();return"symbol"}else{M.skipToEnd();return"error"}}else{if(K=="#"){var K=M.next();if(K=="["){G="open";return"bracket"}else{if(/[+\-=\.']/.test(K)){return null}else{if(/\d/.test(K)&&M.match(/^\d*#/)){return null}else{if(K=="|"){return(L.tokenize=H)(M,L)}else{if(K==":"){E(M);return"meta"}else{return"error"}}}}}}else{var J=E(M);if(J=="."){return null}G="symbol";if(J=="nil"||J=="t"){return"atom"}if(J.charAt(0)==":"){return"keyword"}if(J.charAt(0)=="&"){return"variable-2"}return"variable"}}}}}}}}function D(M,K){var L=false,J;while(J=M.next()){if(J=='"'&&!L){K.tokenize=A;break}L=!L&&J=="\\"}return"string"}function H(M,L){var J,K;while(J=M.next()){if(J=="#"&&K=="|"){L.tokenize=A;break}K=J}G="ws";return"comment"}return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},tokenize:A}},token:function(L,K){if(L.sol()&&typeof K.ctx.indentTo!="number"){K.ctx.indentTo=K.ctx.start+1}G=null;var J=K.tokenize(L,K);if(G!="ws"){if(K.ctx.indentTo==null){if(G=="symbol"&&I.test(L.current())){K.ctx.indentTo=K.ctx.start+B.indentUnit}else{K.ctx.indentTo="next"}}else{if(K.ctx.indentTo=="next"){K.ctx.indentTo=L.column()}}}if(G=="open"){K.ctx={prev:K.ctx,start:L.column(),indentTo:null}}else{if(G=="close"){K.ctx=K.ctx.prev||K.ctx}}return J},indent:function(L,J){var K=L.ctx.indentTo;return typeof K=="number"?K:L.ctx.start+1},lineComment:";;",blockCommentStart:"#|",blockCommentEnd:"|#"}});CodeMirror.defineMIME("text/x-common-lisp","commonlisp");