Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: utils/comments.js

Issue 29350140: Issue 4353 - Remove non standard for each syntax (Closed)
Patch Set: Created Aug. 24, 2016, 11:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: utils/comments.js
diff --git a/utils/comments.js b/utils/comments.js
index 376086f261d74967b1b2b0991e5485ed40088a1a..c1cc8b91a124183fa08f16732c307ee01fa44d8e 100644
--- a/utils/comments.js
+++ b/utils/comments.js
@@ -21,34 +21,34 @@ function associate_comments(filename, scopeObject) {
last = last.kids[last.kids.length - 1];
locations.push({loc: {line: last.line, column: last.column}});
}
- for each (let v in scopeObject.variables)
+ for (let v of scopeObject.variables)
locations.push({loc: v.loc, obj: v, commentWanted: true});
- for each (let v in scopeObject.constants)
+ for (let v of scopeObject.constants)
locations.push({loc: v.loc, obj: v, commentWanted: true});
- for each (let v in scopeObject.functions)
+ for (let v of scopeObject.functions)
add_func(v);
- for each (let v in scopeObject.code)
+ for (let v of scopeObject.code)
locations.push({loc: {line: v.line, column: v.column}, obj: v});
- for each (let o in scopeObject.objects) {
+ for (let o of scopeObject.objects) {
locations.push({loc: o.loc, obj: o, commentWanted: true});
- for each (let x in o.variables)
+ for (let x of o.variables)
locations.push({loc: x.loc, obj: x, commentWanted: true});
- for each (let x in o.functions)
+ for (let x of o.functions)
add_func(x);
- for each (let x in o.getters)
+ for (let x of o.getters)
add_func(x);
- for each (let x in o.setters)
+ for (let x of o.setters)
add_func(x);
}
- for each (let o in scopeObject.classes) {
+ for (let o of scopeObject.classes) {
locations.push({loc: o.loc, obj: o, commentWanted: true});
- for each (let x in o.variables)
+ for (let x of o.variables)
locations.push({loc: x.loc, obj: x, commentWanted: true});
- for each (let x in o.functions)
+ for (let x of o.functions)
add_func(x);
- for each (let x in o.getters)
+ for (let x of o.getters)
add_func(x);
- for each (let x in o.setters)
+ for (let x of o.setters)
add_func(x);
}
locations.sort(function (a, b) {
« scripts/decompile.js ('K') | « utils/cleanast.js ('k') | utils/dumpast.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld