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

Side by Side Diff: jshydra.js

Issue 6256752412590080: Issue 301 - jshydra: Handle for .. of .. (Closed)
Patch Set: Created April 10, 2014, 5:05 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/abprewrite.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var include = function(file) 1 var include = function(file)
2 { 2 {
3 if (typeof include.dirStack == "undefined") 3 if (typeof include.dirStack == "undefined")
4 include.dirStack = []; 4 include.dirStack = [];
5 5
6 if (include.dirStack.length && !/^([a-zA-Z]:)?[\/\\]/.test(file)) 6 if (include.dirStack.length && !/^([a-zA-Z]:)?[\/\\]/.test(file))
7 file = include.dirStack[include.dirStack.length - 1] + "/../" + file; 7 file = include.dirStack[include.dirStack.length - 1] + "/../" + file;
8 while (/\/[^.\/][^\/]*\/\.\.(?=\/)/.test(file)) 8 while (/\/[^.\/][^\/]*\/\.\.(?=\/)/.test(file))
9 file = file.replace(/\/[^.\/][^\/]*\/\.\.(?=\/)/, ""); 9 file = file.replace(/\/[^.\/][^\/]*\/\.\.(?=\/)/, "");
10 10
(...skipping 22 matching lines...) Expand all
33 scriptArgs.splice(i--, 2); 33 scriptArgs.splice(i--, 2);
34 } 34 }
35 } 35 }
36 36
37 if (!scriptArgs.length) 37 if (!scriptArgs.length)
38 throw Error("No script to execute"); 38 throw Error("No script to execute");
39 include(scriptArgs[0]); 39 include(scriptArgs[0]);
40 40
41 for (var i = 1; i < scriptArgs.length; i++) 41 for (var i = 1; i < scriptArgs.length; i++)
42 process_js(Reflect.parse(read(scriptArgs[i])), scriptArgs[i], scriptArg); 42 process_js(Reflect.parse(read(scriptArgs[i])), scriptArgs[i], scriptArg);
43 })(arguments); 43 })(this.arguments || this.scriptArgs);
Wladimir Palant 2014/04/10 17:15:10 I don't really get this change, mind explaining?
OLDNEW
« no previous file with comments | « no previous file | scripts/abprewrite.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld