MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / identifier

Function identifier

lib/web/jshint.js:20448–20485  ·  view source on GitHub ↗
(fnparam, prop)

Source from the content-addressed store, hash-verified

20446 // argument
20447 // prop means that this identifier is that of an object property
20448 function identifier(fnparam, prop) {
20449 var i = optionalidentifier(fnparam, prop, false);
20450 if (i) {
20451 return i;
20452 }
20453
20454 // parameter destructuring with rest operator
20455 if (state.tokens.next.value === "...") {
20456 if (!state.inES6(true)) {
20457 warning("W119", state.tokens.next, "spread/rest operator", "6");
20458 }
20459 advance();
20460
20461 if (checkPunctuator(state.tokens.next, "...")) {
20462 warning("E024", state.tokens.next, "...");
20463 while (checkPunctuator(state.tokens.next, "...")) {
20464 advance();
20465 }
20466 }
20467
20468 if (!state.tokens.next.identifier) {
20469 warning("E024", state.tokens.curr, state.tokens.next.id);
20470 return;
20471 }
20472
20473 return identifier(fnparam, prop);
20474 } else {
20475 error("E030", state.tokens.next, state.tokens.next.value);
20476
20477 // The token should be consumed after a warning is issued so the parser
20478 // can continue as though an identifier were found. The semicolon token
20479 // should not be consumed in this way so that the parser interprets it as
20480 // a statement delimeter;
20481 if (state.tokens.next.id !== ";") {
20482 advance();
20483 }
20484 }
20485 }
20486
20487
20488 function reachable(controlToken) {

Callers 8

jshint.jsFile · 0.70
functionparamsFunction · 0.70
metaPropertyFunction · 0.70
nextInnerDEFunction · 0.70
assignmentPropertyFunction · 0.70
blockVariableStatementFunction · 0.70
classdefFunction · 0.70
doCatchFunction · 0.70

Calls 5

optionalidentifierFunction · 0.85
warningFunction · 0.85
checkPunctuatorFunction · 0.85
errorFunction · 0.85
advanceFunction · 0.70

Tested by

no test coverage detected