Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "jsdc", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "compiler ecmascript6 to ecmascript5", | ||
@@ -5,0 +5,0 @@ "maintainers": [ |
@@ -23,5 +23,3 @@ var homunculus = require('homunculus'); | ||
//存放临时li供block首尾改写引用 | ||
this.hash[node.nid()] = { | ||
temp: this.jsdc.uid() | ||
}; | ||
this.hash[node.nid()] = true; | ||
this.jsdc.ignore(of, 'forof1'); | ||
@@ -32,19 +30,6 @@ } | ||
var last = node.last(); | ||
var s = ''; | ||
if(!this.jsdc.endsWith(';') | ||
&& !this.jsdc.endsWith(':') | ||
&& !this.jsdc.endsWith('{') | ||
&& !this.jsdc.endsWith('\n')) { | ||
s = ';'; | ||
} | ||
s += this.hash[node.nid()].id + '=' + this.hash[node.nid()].temp; | ||
if(last.name() != JsNode.BLOCKSTMT) { | ||
//临时引用写回,使循环正常 | ||
this.jsdc.appendBefore(s); | ||
//}闭合 | ||
this.jsdc.appendBefore('}'); | ||
} | ||
else { | ||
this.jsdc.insert(s, this.jsdc.res.length - 1); | ||
} | ||
} | ||
@@ -109,7 +94,3 @@ }, | ||
} | ||
//先存下临时引用 | ||
var o = this.hash[node.nid()]; | ||
o.id = k; | ||
this.jsdc.append('var ' + o.temp + '=' + k + ';'); | ||
this.jsdc.append(k + '=' + o.temp + '.value;'); | ||
this.jsdc.append(k + '=' + k + '.value;'); | ||
} | ||
@@ -116,0 +97,0 @@ }); |
@@ -24,5 +24,3 @@ define(function(require, exports, module) { | ||
//存放临时li供block首尾改写引用 | ||
this.hash[node.nid()] = { | ||
temp: this.jsdc.uid() | ||
}; | ||
this.hash[node.nid()] = true; | ||
this.jsdc.ignore(of, 'forof1'); | ||
@@ -33,19 +31,6 @@ } | ||
var last = node.last(); | ||
var s = ''; | ||
if(!this.jsdc.endsWith(';') | ||
&& !this.jsdc.endsWith(':') | ||
&& !this.jsdc.endsWith('{') | ||
&& !this.jsdc.endsWith('\n')) { | ||
s = ';'; | ||
} | ||
s += this.hash[node.nid()].id + '=' + this.hash[node.nid()].temp; | ||
if(last.name() != JsNode.BLOCKSTMT) { | ||
//临时引用写回,使循环正常 | ||
this.jsdc.appendBefore(s); | ||
//}闭合 | ||
this.jsdc.appendBefore('}'); | ||
} | ||
else { | ||
this.jsdc.insert(s, this.jsdc.res.length - 1); | ||
} | ||
} | ||
@@ -110,7 +95,3 @@ }, | ||
} | ||
//先存下临时引用 | ||
var o = this.hash[node.nid()]; | ||
o.id = k; | ||
this.jsdc.append('var ' + o.temp + '=' + k + ';'); | ||
this.jsdc.append(k + '=' + o.temp + '.value;'); | ||
this.jsdc.append(k + '=' + k + '.value;'); | ||
} | ||
@@ -117,0 +98,0 @@ }); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
264168
33
6075