Sha256: e7929f75e02a747dac7b962ba3c733a304f7cf45f6a3b4653bc22f1090f3f9c4

Contents?: true

Size: 1.88 KB

Versions: 20

Compression:

Stored size: 1.88 KB

Contents

CodeMirror.defineMode("velocity",function(e){function r(e){for(var r={},t=e.split(" "),n=0;n<t.length;++n)r[t[n]]=!0;return r}function t(e,r,t){return r.tokenize=t,t(e,r)}function n(e,r){var n=r.beforeParams;r.beforeParams=!1;var l=e.next();if('"'!=l&&"'"!=l||!r.inParams){if(/[\[\]{}\(\),;\.]/.test(l))return"("==l&&n?r.inParams=!0:")"==l&&(r.inParams=!1),null;if(/\d/.test(l))return e.eatWhile(/[\w\.]/),"number";if("#"==l&&e.eat("*"))return t(e,r,o);if("#"==l&&e.match(/ *\[ *\[/))return t(e,r,i);if("#"==l&&e.eat("#"))return e.skipToEnd(),"comment";if("$"==l)return e.eatWhile(/[\w\d\$_\.{}]/),c&&c.propertyIsEnumerable(e.current().toLowerCase())?"keyword":(r.beforeParams=!0,"builtin");if(s.test(l))return e.eatWhile(s),"operator";e.eatWhile(/[\w\$_{}]/);var m=e.current().toLowerCase();return f&&f.propertyIsEnumerable(m)?"keyword":u&&u.propertyIsEnumerable(m)||e.current().match(/^#[a-z0-9_]+ *$/i)&&"("==e.peek()?(r.beforeParams=!0,"keyword"):null}return t(e,r,a(l))}function a(e){return function(r,t){for(var a,o=!1,i=!1;null!=(a=r.next());){if(a==e&&!o){i=!0;break}o=!o&&"\\"==a}return i&&(t.tokenize=n),"string"}}function o(e,r){for(var t,a=!1;t=e.next();){if("#"==t&&a){r.tokenize=n;break}a="*"==t}return"comment"}function i(e,r){for(var t,a=0;t=e.next();){if("#"==t&&2==a){r.tokenize=n;break}"]"==t?a++:" "!=t&&(a=0)}return"meta"}e.indentUnit;var f=r("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),u=r("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),c=r("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent $velocityCount"),s=/[+\-*&%=<>!?:\/|]/;return{startState:function(){return{tokenize:n,beforeParams:!1,inParams:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)}}}),CodeMirror.defineMIME("text/velocity","velocity");

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rearview-1.2.1-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.2.0-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.1.2-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.1.1-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.1.0-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.3.rc.4-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.3.rc.3-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.3.rc.2-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.3.rc.1-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.2-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.2.rc.4-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.2.rc.3-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.2.rc.2-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.2.rc.1-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.1-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.0-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.0.rc5-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.0.rc4-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.0.rc3-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js
rearview-1.0.0.rc2-jruby public/rearview/vendor/codemirror/mode/velocity/velocity.js