Sha256: ea07436bae5c7aadf2147deef10b04b698c0f3e6420560880bfd6e3e0e81b7ab

Contents?: true

Size: 1.89 KB

Versions: 23

Compression:

Stored size: 1.89 KB

Contents

CodeMirror.defineMode("smarty",function(e){function t(e,t){return o=t,e}function r(e,t){function r(r){return t.tokenize=r,r(e,t)}return e.match(l,!0)?e.eat("*")?r(a("comment","*"+d)):(t.tokenize=i,"tag"):(e.next(),null)}function i(e,i){if(e.match(d,!0))return i.tokenize=r,t("tag",null);var a=e.next();if("$"==a)return e.eatWhile(u.validIdentifier),t("variable-2","variable");if("."==a)return t("operator","property");if(u.stringChar.test(a))return i.tokenize=n(a),t("string","string");if(u.operatorChars.test(a))return e.eatWhile(u.operatorChars),t("operator","operator");if("["==a||"]"==a)return t("bracket","bracket");if(/\d/.test(a))return e.eatWhile(/\d/),t("number","number");if("variable"==i.last){if("@"==a)return e.eatWhile(u.validIdentifier),t("property","property");if("|"==a)return e.eatWhile(u.validIdentifier),t("qualifier","modifier")}else{if("whitespace"==i.last)return e.eatWhile(u.validIdentifier),t("attribute","modifier");if("property"==i.last)return e.eatWhile(u.validIdentifier),t("property",null);if(/\s/.test(a))return o="whitespace",null}var l="";"/"!=a&&(l+=a);for(var s="";s=e.eat(u.validIdentifier);)l+=s;var c,m;for(c=0,m=f.length;m>c;c++)if(f[c]==l)return t("keyword","keyword");return/\s/.test(a)?null:t("tag","tag")}function n(e){return function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"}}function a(e,t){return function(i,n){for(;!i.eol();){if(i.match(t)){n.tokenize=r;break}i.next()}return e}}var o,f=["debug","extends","function","include","literal"],u={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9\_]/,stringChar:/[\'\"]/},l="undefined"!=typeof e.mode.leftDelimiter?e.mode.leftDelimiter:"{",d="undefined"!=typeof e.mode.rightDelimiter?e.mode.rightDelimiter:"}";return{startState:function(){return{tokenize:r,mode:"smarty",last:null}},token:function(e,t){var r=t.tokenize(e,t);return t.last=o,r},electricChars:""}}),CodeMirror.defineMIME("text/x-smarty","smarty");

Version data entries

23 entries across 23 versions & 1 rubygems

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