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: Removed unused code Created Aug. 24, 2016, 2:40 p.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
« no previous file with comments | « scripts/doxygen.js ('k') | scripts/findInterfaces.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/dxr.js
diff --git a/scripts/dxr.js b/scripts/dxr.js
deleted file mode 100644
index 86cce882c589591a007fc88c6c83aa1351d3aec2..0000000000000000000000000000000000000000
--- a/scripts/dxr.js
+++ /dev/null
@@ -1,72 +0,0 @@
-// This is a simple test to test global magic
-
-include("../utils/cleanast.js");
-include("../utils/dumpast.js");
-include("../utils/jstypes.js");
-
-function process_js(ast, f) {
- function loc(l) {
- return f + ":" + l.line + ":" + l.column;
- }
- let toplevel = clean_ast(ast);
- _print("Global variables:");
- for each (let v in toplevel.variables) {
- _print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
- }
- _print("Global constants:");
- for each (let v in toplevel.constants) {
- _print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
- }
- _print("Global objects:");
- for each (let v in toplevel.objects) {
- divine_inheritance(v, toplevel.constants);
- _print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
- if (v.inherits) {
- _print("\tInherits from " + v.inherits.join(", "));
- }
- _print("\tFunctions:");
- for (let name in v.functions) {
- _print("\t\t" + name + " at " + loc(v.functions[name].loc));
- }
- _print("\tVariables:");
- for (let name in v.variables) {
- _print("\t\t" + name + " at " + loc(v.variables[name].loc));
- }
- _print("\tGetters:");
- for (let name in v.getters) {
- _print("\t\t" + name + " at " + loc(v.getters[name].loc));
- }
- _print("\tSetters:");
- for (let name in v.setters) {
- _print("\t\t" + name + " at " + loc(v.setters[name].loc));
- }
- }
- _print("Global classes:");
- for each (let v in toplevel.classes) {
- divine_inheritance(v, toplevel.constants);
- _print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
- if (v.inherits) {
- _print("\tInherits from " + v.inherits.join(", "));
- }
- _print("\tFunctions:");
- for (let name in v.functions) {
- _print("\t\t" + name + " at " + loc(v.functions[name].loc));
- }
- _print("\tVariables:");
- for (let name in v.variables) {
- _print("\t\t" + name + " at " + loc(v.variables[name].loc));
- }
- _print("\tGetters:");
- for (let name in v.getters) {
- _print("\t\t" + name + " at " + loc(v.getters[name].loc));
- }
- _print("\tSetters:");
- for (let name in v.setters) {
- _print("\t\t" + name + " at " + loc(v.setters[name].loc));
- }
- }
- _print("Global functions:");
- for each (let v in toplevel.functions) {
- _print("\t" + v.name + " at " + f + ":" + v.loc.line + ":" + v.loc.column);
- }
-}
« no previous file with comments | « scripts/doxygen.js ('k') | scripts/findInterfaces.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld