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

Function function_

front-end/UglifyJS/parse-js.js:856–884  ·  view source on GitHub ↗
(in_statement)

Source from the content-addressed store, hash-verified

854 };
855
856 function function_(in_statement) {
857 var name = is("name") ? prog1(S.token.value, next) : null;
858 if (in_statement && !name)
859 unexpected();
860 expect("(");
861 return as(in_statement ? "defun" : "function",
862 name,
863 // arguments
864 (function(first, a){
865 while (!is("punc", ")")) {
866 if (first) first = false; else expect(",");
867 if (!is("name")) unexpected();
868 a.push(S.token.value);
869 next();
870 }
871 next();
872 return a;
873 })(true, []),
874 // body
875 (function(){
876 ++S.in_function;
877 var loop = S.in_loop;
878 S.in_loop = 0;
879 var a = block_();
880 --S.in_function;
881 S.in_loop = loop;
882 return a;
883 })());
884 };
885
886 function if_() {
887 var cond = parenthesised(), body = statement(), belse;

Callers 3

$statementFunction · 0.85
expr_atomFunction · 0.85
object_Function · 0.85

Calls 7

isFunction · 0.85
prog1Function · 0.85
unexpectedFunction · 0.85
asFunction · 0.85
nextFunction · 0.85
block_Function · 0.85
expectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…