Comparing version 1.4.7 to 1.4.8
/* | ||
Crox v1.4.7 | ||
Crox v1.4.8 | ||
https://github.com/thx/crox | ||
Released under the MIT license | ||
md5: 70a0da69436018c598b888ea04b86f56 | ||
md5: c2a2dabe8a2526838576a821ae8e663d | ||
*/ | ||
@@ -28,3 +28,3 @@ (function(E){var t=function(){function t(a,c){this.row=a;this.col=c}function E(a,c){var e=a.substring(0,c),h=e.match(/\r\n?|\n/g),d=1;h&&(d+=h.length);e=1+/[^\r\n]*$/.exec(e)[0].length;return new t(d,e)}function J(a){return'"'+a.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+E(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var e=0;e<a.length;++e)a[e]=a[e].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , : ?".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return P({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{\*[\s\S]*\*}}/],[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState(); | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return P({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{\*[\s\S]*?\*}}/],[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState(); | ||
return"rawtext"}]],"{{":a.concat([[/}}/,function(a){this.popState();return a}]]),"{{{":a.concat([[/}}}/,function(a){this.popState();return a}]])})}(),R=function(){var a={nStart:43,tSymbols:"$ ! && ( ) + , - . : = ? [ ] boolean eq include mul null number rawtext realId rel script set string text { {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || } }} }}} AdditiveExpression ArrayLiteral ConditionalExpression ElementList Elision EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression ObjectLiteral PrimaryExpression PropertyAssignment PropertyNameAndValueList RelationalExpression UnaryExpression _text args empty expr id name program statement statements texts program'".split(" "), | ||
@@ -47,3 +47,3 @@ actionList:[{_:-1},{23:5,26:11,28:9,29:7,30:8,31:6,32:12,38:10,_:-32768},{_:-2},{26:11,32:12,_:-15},{_:-19},{_:-3},{1:38,3:34,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:0},{1:38,3:34,7:39,12:36,14:33,16:44,18:35,19:32,21:31,24:43,25:30,27:37,_:0},{_:-21},{20:46,_:0},{_:-20},{_:-29},{_:-47},{_:-31},{_:-32},{3:47,8:49,12:48,_:-54},{_:-57},{17:50,_:-59},{5:52,7:51,_:-62},{22:53,_:-64},{15:54,_:-66},{2:55,_:-68},{11:57,39:56,_:-70},{_:-72},{41:58,_:0},{_:-24},{_:-25},{_:-26},{_:-23}, | ||
b,c){a.push(c);return a},,function(a,b){return["!",b]},function(a,b){return["u-",b]},,k,,k,k,,k,,k,,k,,k,,function(a,b,c,d,e){return["cond",a,c,e]}];B&&(t=function(a,b){var c=u[B[a]];return c[b]||c._});var F=0,v=[0],w=c.scan(),x=[],E={get:function(a){return x[x.length+a]},set:function(a,b){x[x.length+a]=b}};if(e)for(m in e)E[m]=e[m];for(;;)if(m=t(F,n[w.tag]))if(0<m)v.push(F=m),x.push(w),w=c.scan();else if(0>m&&-32768<m){var m=-m,F=A[m],y=F.length-1;v.length-=y;F=l[v[v.length-1]][F[0]];v.push(F);C[m]? | ||
(m=C[m].apply(E,x.splice(x.length-y,y)),x.push(m)):1!=y&&x.splice(x.length-y,y,null)}else return w.tag!=D[0]&&r(),x[0];else{m=[];for(y=0;y<z;++y)t(F,y)&&m.push(D[y]);r("find "+w.tag+"\nexpect "+m.join(" "))}}}();return{parse:I,compile:O,render:function(a,c){return O(a)(c)},compileToPhp:function(a){return T(I(a),!0)},compileToVM:function(a,c){return U(I(a))},version:"1.4.7"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=t:"function"==typeof define&&(define.amd|| | ||
(m=C[m].apply(E,x.splice(x.length-y,y)),x.push(m)):1!=y&&x.splice(x.length-y,y,null)}else return w.tag!=D[0]&&r(),x[0];else{m=[];for(y=0;y<z;++y)t(F,y)&&m.push(D[y]);r("find "+w.tag+"\nexpect "+m.join(" "))}}}();return{parse:I,compile:O,render:function(a,c){return O(a)(c)},compileToPhp:function(a){return T(I(a),!0)},compileToVM:function(a,c){return U(I(a))},version:"1.4.8"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=t:"function"==typeof define&&(define.amd|| | ||
define.cmd)?define(function(){return t}):"undefined"!=typeof KISSY&&KISSY.add(function(){return t});E&&(E.Crox=t)})(this); |
/** | ||
* @preserve Crox v1.4.7 | ||
* @preserve Crox v1.4.8 | ||
* https://github.com/thx/crox | ||
* | ||
* Released under the MIT license | ||
* md5: 70a0da69436018c598b888ea04b86f56 | ||
* md5: c2a2dabe8a2526838576a821ae8e663d | ||
*/ | ||
@@ -322,3 +322,3 @@ (function(root) {var Crox = (function() { | ||
}], | ||
[/{{\*[\s\S]*\*}}/], | ||
[/{{\*[\s\S]*?\*}}/], | ||
[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/, function(a) { | ||
@@ -1082,2 +1082,2 @@ this.pushState('{{'); | ||
Crox.version = "1.4.7";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); | ||
Crox.version = "1.4.8";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); |
/* | ||
Crox v1.4.7 | ||
Crox v1.4.8 | ||
https://github.com/thx/crox | ||
Released under the MIT license | ||
md5: ad46af2f62fc3e903f9fd5dbf59e6d19 | ||
md5: 1f44aff8abb900d62251f5105fa86472 | ||
*/ | ||
@@ -21,3 +21,3 @@ (function(x){var q=function(){function q(a,c){this.row=a;this.col=c}function x(a,c){var e=a.substring(0,c),h=e.match(/\r\n?|\n/g),d=1;h&&(d+=h.length);e=1+/[^\r\n]*$/.exec(e)[0].length;return new q(d,e)}function H(a){return'"'+a.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+x(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var e=0;e<a.length;++e)a[e]=a[e].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , : ?".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return S({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{\*[\s\S]*\*}}/],[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState(); | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return S({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{\*[\s\S]*?\*}}/],[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState(); | ||
return"rawtext"}]],"{{":a.concat([[/}}/,function(a){this.popState();return a}]]),"{{{":a.concat([[/}}}/,function(a){this.popState();return a}]])})}(),U=function(){var a={nStart:43,tSymbols:"$ ! && ( ) + , - . : = ? [ ] boolean eq include mul null number rawtext realId rel script set string text { {{ {{#each {{#forin {{#if {{#raw}} {{/each}} {{/forin}} {{/if}} {{/raw}} {{else}} {{{ || } }} }}} AdditiveExpression ArrayLiteral ConditionalExpression ElementList Elision EqualityExpression LogicalAndExpression LogicalOrExpression MemberExpression MultiplicativeExpression ObjectLiteral PrimaryExpression PropertyAssignment PropertyNameAndValueList RelationalExpression UnaryExpression _text args empty expr id name program statement statements texts program'".split(" "), | ||
@@ -40,3 +40,3 @@ actionList:[{_:-1},{23:5,26:11,28:9,29:7,30:8,31:6,32:12,38:10,_:-32768},{_:-2},{26:11,32:12,_:-15},{_:-19},{_:-3},{1:38,3:34,7:39,12:36,14:33,16:29,18:35,19:32,21:31,24:28,25:30,27:37,_:0},{1:38,3:34,7:39,12:36,14:33,16:44,18:35,19:32,21:31,24:43,25:30,27:37,_:0},{_:-21},{20:46,_:0},{_:-20},{_:-29},{_:-47},{_:-31},{_:-32},{3:47,8:49,12:48,_:-54},{_:-57},{17:50,_:-59},{5:52,7:51,_:-62},{22:53,_:-64},{15:54,_:-66},{2:55,_:-68},{11:57,39:56,_:-70},{_:-72},{41:58,_:0},{_:-24},{_:-25},{_:-26},{_:-23}, | ||
b,c){a.push(c);return a},,function(a,b){return["!",b]},function(a,b){return["u-",b]},,y,,y,y,,y,,y,,y,,y,,function(a,b,c,d,e){return["cond",a,c,e]}];z&&(C=function(a,b){var c=p[z[a]];return c[b]||c._});var w=0,G=[0],F=c.scan(),t=[],A={get:function(a){return t[t.length+a]},set:function(a,b){t[t.length+a]=b}};if(e)for(b in e)A[b]=e[b];for(;;)if(b=C(w,l[F.tag]))if(0<b)G.push(w=b),t.push(F),F=c.scan();else if(0>b&&-32768<b){var b=-b,w=x[b],u=w.length-1;G.length-=u;w=f[G[G.length-1]][w[0]];G.push(w);r[b]? | ||
(b=r[b].apply(A,t.splice(t.length-u,u)),t.push(b)):1!=u&&t.splice(t.length-u,u,null)}else return F.tag!=v[0]&&m(),t[0];else{b=[];for(u=0;u<E;++u)C(w,u)&&b.push(v[u]);m("find "+F.tag+"\nexpect "+b.join(" "))}}}();return{parse:Q,compile:R,render:function(a,c){return R(a)(c)},version:"1.4.7"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=q:"function"==typeof define&&(define.amd||define.cmd)?define(function(){return q}):"undefined"!=typeof KISSY&&KISSY.add(function(){return q}); | ||
(b=r[b].apply(A,t.splice(t.length-u,u)),t.push(b)):1!=u&&t.splice(t.length-u,u,null)}else return F.tag!=v[0]&&m(),t[0];else{b=[];for(u=0;u<E;++u)C(w,u)&&b.push(v[u]);m("find "+F.tag+"\nexpect "+b.join(" "))}}}();return{parse:Q,compile:R,render:function(a,c){return R(a)(c)},version:"1.4.8"}}();"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=q:"function"==typeof define&&(define.amd||define.cmd)?define(function(){return q}):"undefined"!=typeof KISSY&&KISSY.add(function(){return q}); | ||
x&&(x.Crox=q)})(this); |
/** | ||
* @preserve Crox v1.4.7 | ||
* @preserve Crox v1.4.8 | ||
* https://github.com/thx/crox | ||
* | ||
* Released under the MIT license | ||
* md5: ad46af2f62fc3e903f9fd5dbf59e6d19 | ||
* md5: 1f44aff8abb900d62251f5105fa86472 | ||
*/ | ||
@@ -322,3 +322,3 @@ (function(root) {var Crox = (function() { | ||
}], | ||
[/{{\*[\s\S]*\*}}/], | ||
[/{{\*[\s\S]*?\*}}/], | ||
[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/, function(a) { | ||
@@ -814,2 +814,2 @@ this.pushState('{{'); | ||
Crox.version = "1.4.7";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); | ||
Crox.version = "1.4.8";return Crox;})();if ( typeof module == "object" && module && typeof module.exports == "object" ) module.exports = Crox;else if (typeof define == "function" && (define.amd || define.cmd) ) define(function () { return Crox; } );else if (typeof KISSY != "undefined") KISSY.add(function(){ return Crox; });if (root) root.Crox = Crox; })(this); |
/* | ||
Crox v1.4.7 | ||
Crox v1.4.8 | ||
https://github.com/thx/crox | ||
Released under the MIT license | ||
md5: e146a5d78a6b80dd7324ca8bfbf01967 | ||
md5: 5344a500432ebe9b6eeaea4051c6100c | ||
*/ | ||
@@ -14,3 +14,3 @@ KISSY.add("crox",function(){function v(b,a){this.row=b;this.col=a}function x(b,a){var e=b.substring(0,a),h=e.match(/\r\n?|\n/g),q=1;h&&(q+=h.length);e=1+/[^\r\n]*$/.exec(e)[0].length;return new v(q,e)}function A(b){return'"'+b.replace(/[\x00-\x1f"\\\u2028\u2029]/g,function(a){switch(a){case '"':return'\\"';case "\\":return"\\\\";case "\b":return"\\b";case "\f":return"\\f";case "\n":return"\\n";case "\r":return"\\r";case "\t":return"\\t"}return"\\u"+("000"+a.charCodeAt(0).toString(16)).slice(-4)})+ | ||
a+" ")||"null"==a)throw Error("Reserved: "+a+" "+x(this.source,this.index));return"realId"}}],[/"(?:[^"\\]|\\[\s\S])*"|'(?:[^'\\]|\\[\s\S])*'/,function(a){return"string"}],[/\d+(?:\.\d+)?(?:e-?\d+)?/,function(a){return"number"}],[/{(?!{)/,function(a){return"{"}],[/}(?!})/,function(a){return"}"}],[function(a){a.sort().reverse();for(var b=0;b<a.length;++b)a[b]=a[b].replace(/[()*+?.[\]|]/g,"\\$&");return RegExp(a.join("|"))}("! % && ( ) * + - . / < <= = > >= [ ] || === !== == != , : ?".split(" ")),function(a){return/[*/%]/.test(a)? | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return C({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{\*[\s\S]*\*}}/],[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState(); | ||
"mul":/[<>]/.test(a)?"rel":/[!=]=/.test(a)?"eq":a}]];return C({"":[[/(?:(?!{{)[\s\S])+/,function(a){return"text"}],[/{{{/,function(a){this.pushState(a);return a}],[/{{(?:\/if|else|\/each|\/forin|\/raw)}}/,function(a){return a}],[/{{#raw}}/,function(a){this.pushState("raw");return a}],[/{{<script>[\s\S]*?<\/script>}}/,function(a){return"script"}],[/{{\*[\s\S]*?\*}}/],[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/,function(a){this.pushState("{{");return a}]],raw:[[/(?:(?!{{\/raw}})[\s\S])+/,function(a){this.popState(); | ||
return"rawtext"}]],"{{":b.concat([[/}}/,function(a){this.popState();return a}]]),"{{{":b.concat([[/}}}/,function(a){this.popState();return a}]])})}(),D=function(){return function(b){function a(a,b){return d[a][b]}for(var e=b.nStart,h=b.tSymbols,q={},f=0;f<h.length;++f)q[h[f]]=f;var d=b.tAction,t=b.tGoto,u=b.tRules,c=b.tFuncs,r=b.actionIndex;r&&(a=function(a,b){var t=d[r[a]];return t[b]||t._});return function(b,k){function d(a){throw Error("Syntax error: "+b.getPos(m.index)+(a?"\n"+a:""));}var r=0, | ||
@@ -17,0 +17,0 @@ l=[0],m=b.scan(),g=[],p={get:function(a){return g[g.length+a]},set:function(a,b){g[g.length+a]=b}};if(k)for(var n in k)p[n]=k[n];for(;;)if(n=a(r,q[m.tag]))if(0<n)l.push(r=n),g.push(m),m=b.scan();else if(0>n&&-32768<n){n=-n;var r=u[n],f=r.length-1;l.length-=f;r=t[l[l.length-1]][r[0]-e];l.push(r);c[n]?(n=c[n].apply(p,g.splice(g.length-f,f)),g.push(n)):1!=f&&g.splice(g.length-f,f,null)}else return m.tag!=h[0]&&d(),g[0];else{n=[];for(f=0;f<e;++f)a(r,f)&&n.push(h[f]);d("find "+m.tag+"\nexpect "+n.join(" "))}}}({nStart:37, |
/** | ||
* @preserve Crox v1.4.7 | ||
* @preserve Crox v1.4.8 | ||
* https://github.com/thx/crox | ||
* | ||
* Released under the MIT license | ||
* md5: e146a5d78a6b80dd7324ca8bfbf01967 | ||
* md5: 5344a500432ebe9b6eeaea4051c6100c | ||
*/ | ||
@@ -321,3 +321,3 @@ KISSY.add("crox", function(){function Class(base, constructor, methods) { | ||
}], | ||
[/{{\*[\s\S]*\*}}/], | ||
[/{{\*[\s\S]*?\*}}/], | ||
[/{{(?!\*)(?:#(?:if|each|forin)(?=\s))?/, function(a) { | ||
@@ -324,0 +324,0 @@ this.pushState('{{'); |
{ | ||
"name": "crox", | ||
"version": "1.4.7", | ||
"version": "1.4.8", | ||
"description": "Crox is a high performance cross-language template engine, written by the JavaScript.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://thx.github.io/crox/", |
164617