Sha256: 1a572d57aaa34ebc6d2c394ae5cf2a012f3d1b59c6e01e47415d4659fe2576e7

Contents?: true

Size: 1.86 KB

Versions: 23

Compression:

Stored size: 1.86 KB

Contents

CodeMirror.defineMode("commonlisp",function(t){function n(t){for(var n;n=t.next();)if("\\"==n)t.next();else if(!a.test(n)){t.backUp(1);break}return t.current()}function e(t,e){if(t.eatSpace())return i="ws",null;if(t.match(u))return"number";var c=t.next();if("\\"==c&&(c=t.next()),'"'==c)return(e.tokenize=r)(t,e);if("("==c)return i="open","bracket";if(")"==c||"]"==c)return i="close","bracket";if(";"==c)return t.skipToEnd(),i="ws","comment";if(/['`,@]/.test(c))return null;if("|"==c)return t.skipTo("|")?(t.next(),"symbol"):(t.skipToEnd(),"error");if("#"==c){var c=t.next();return"["==c?(i="open","bracket"):/[+\-=\.']/.test(c)?null:/\d/.test(c)&&t.match(/^\d*#/)?null:"|"==c?(e.tokenize=o)(t,e):":"==c?(n(t),"meta"):"error"}var a=n(t);return"."==a?null:(i="symbol","nil"==a||"t"==a?"atom":":"==a.charAt(0)?"keyword":"&"==a.charAt(0)?"variable-2":"variable")}function r(t,n){for(var r,o=!1;r=t.next();){if('"'==r&&!o){n.tokenize=e;break}o=!o&&"\\"==r}return"string"}function o(t,n){for(var r,o;r=t.next();){if("#"==r&&"|"==o){n.tokenize=e;break}o=r}return i="ws","comment"}var i,c=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,u=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,a=/[^\s'`,@()\[\]";]/;return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},tokenize:e}},token:function(n,e){n.sol()&&"number"!=typeof e.ctx.indentTo&&(e.ctx.indentTo=e.ctx.start+1),i=null;var r=e.tokenize(n,e);return"ws"!=i&&(null==e.ctx.indentTo?e.ctx.indentTo="symbol"==i&&c.test(n.current())?e.ctx.start+t.indentUnit:"next":"next"==e.ctx.indentTo&&(e.ctx.indentTo=n.column())),"open"==i?e.ctx={prev:e.ctx,start:n.column(),indentTo:null}:"close"==i&&(e.ctx=e.ctx.prev||e.ctx),r},indent:function(t){var n=t.ctx.indentTo;return"number"==typeof n?n:t.ctx.start+1}}}),CodeMirror.defineMIME("text/x-common-lisp","commonlisp");

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.2.2.rc.2-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.2.2.rc.1-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.2.1-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.2.0-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.1.2-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.1.1-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.1.0-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.3.rc.4-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.3.rc.3-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.3.rc.2-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.3.rc.1-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.2-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.2.rc.4-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.2.rc.3-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.2.rc.2-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.2.rc.1-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.1-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.0-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js
rearview-1.0.0.rc5-jruby public/rearview/vendor/codemirror/mode/commonlisp/commonlisp.js