Update ProgramNode to better match SpiderMonkey

This commit is contained in:
kpdecker
2014-11-26 09:18:33 -06:00
parent 61dd721ca2
commit df421f1e4b
8 changed files with 119 additions and 118 deletions
+4 -4
View File
@@ -7,12 +7,12 @@ Visitor.prototype = {
return object && this[object.type] && this[object.type](object);
},
program: function(program) {
var statements = program.statements,
Program: function(program) {
var body = program.body,
i, l;
for(i=0, l=statements.length; i<l; i++) {
this.accept(statements[i]);
for(i=0, l=body.length; i<l; i++) {
this.accept(body[i]);
}
},