MCPcopy Create free account
hub / github.com/node-inspector/node-inspector / for_

Function for_

front-end/UglifyJS/parse-js.js:832–854  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

830 };
831
832 function for_() {
833 expect("(");
834 var has_var = is("keyword", "var");
835 if (has_var)
836 next();
837 if (is("name") && is_token(peek(), "operator", "in")) {
838 // for (i in foo)
839 var name = S.token.value;
840 next(); next();
841 var obj = expression();
842 expect(")");
843 return as("for-in", has_var, name, obj, in_loop(statement));
844 } else {
845 // classic for
846 var init = is("punc", ";") ? null : has_var ? var_() : expression();
847 expect(";");
848 var test = is("punc", ";") ? null : expression();
849 expect(";");
850 var step = is("punc", ")") ? null : expression();
851 expect(")");
852 return as("for", init, test, step, in_loop(statement));
853 }
854 };
855
856 function function_(in_statement) {
857 var name = is("name") ? prog1(S.token.value, next) : null;

Callers 1

$statementFunction · 0.85

Calls 9

isFunction · 0.85
nextFunction · 0.85
is_tokenFunction · 0.85
peekFunction · 0.85
asFunction · 0.85
in_loopFunction · 0.85
var_Function · 0.85
expectFunction · 0.70
expressionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…