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

Unified Diff: scripts/findInterfaces.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
« scripts/decompile.js ('K') | « scripts/dxr.js ('k') | utils/astml.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/findInterfaces.js
diff --git a/scripts/findInterfaces.js b/scripts/findInterfaces.js
index 4e5ce4cd4ab9ca52f36766b30b66d21028c6bd38..dd95a08d200971d4d4553fb51426c612c3d08971 100644
--- a/scripts/findInterfaces.js
+++ b/scripts/findInterfaces.js
@@ -9,7 +9,7 @@ function visit(root_ast, func) {
if (ast == null)
return;
func(ast);
- for each (let child in ast.kids)
+ for (let child of ast.kids)
v_r(child, func);
}
@@ -23,7 +23,7 @@ function visit(root_ast, func) {
let sanitized_ast = { kids: [] };
for (let key in ast) {
if (key == 'kids') {
- for each (let kid in ast.kids) {
+ for (let kid of ast.kids) {
sanitized_ast.kids.push(sanitize(kid));
}
} else {
@@ -41,14 +41,14 @@ let filename;
function process_js(ast, f) {
filename = f;
let global = clean_ast(ast);
- for each (let c in global.constants) {
+ for (let c of global.constants) {
mark_globals(c);
}
//_print(uneval(aliases));
- for each (let v in global.variables) {
+ for (let v of global.variables) {
visit(v.init, find_interfaces);
}
- for each (let statement in global.code)
+ for (let statement of global.code)
visit(statement, find_interfaces);
//_print(uneval(global));
}
« scripts/decompile.js ('K') | « scripts/dxr.js ('k') | utils/astml.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld