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

Unified Diff: scripts/dxr.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: scripts/dxr.js
diff --git a/scripts/dxr.js b/scripts/dxr.js
index 86cce882c589591a007fc88c6c83aa1351d3aec2..5f5c72a59834766587acb254388401a4b3258289 100644
--- a/scripts/dxr.js
+++ b/scripts/dxr.js
@@ -10,15 +10,15 @@ function process_js(ast, f) {
}
let toplevel = clean_ast(ast);
_print("Global variables:");
- for each (let v in toplevel.variables) {
+ for (let v of toplevel.variables) {
_print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
}
_print("Global constants:");
- for each (let v in toplevel.constants) {
+ for (let v of toplevel.constants) {
_print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
}
_print("Global objects:");
- for each (let v in toplevel.objects) {
+ for (let v of toplevel.objects) {
divine_inheritance(v, toplevel.constants);
_print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
if (v.inherits) {
@@ -42,7 +42,7 @@ function process_js(ast, f) {
}
}
_print("Global classes:");
- for each (let v in toplevel.classes) {
+ for (let v of toplevel.classes) {
divine_inheritance(v, toplevel.constants);
_print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
if (v.inherits) {
@@ -66,7 +66,7 @@ function process_js(ast, f) {
}
}
_print("Global functions:");
- for each (let v in toplevel.functions) {
+ for (let v of toplevel.functions) {
_print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
}
}
« scripts/decompile.js ('K') | « scripts/doxygen.js ('k') | scripts/findInterfaces.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld