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

Function assignmentProperty

lib/web/jshint.js:22367–22394  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22365 return false;
22366 };
22367 var assignmentProperty = function() {
22368 var id;
22369 if (checkPunctuator(state.tokens.next, "[")) {
22370 advance("[");
22371 expression(10);
22372 advance("]");
22373 advance(":");
22374 nextInnerDE();
22375 } else if (state.tokens.next.id === "(string)" ||
22376 state.tokens.next.id === "(number)") {
22377 advance();
22378 advance(":");
22379 nextInnerDE();
22380 } else {
22381 // this id will either be the property name or the property name and the assigning identifier
22382 id = identifier();
22383 if (checkPunctuator(state.tokens.next, ":")) {
22384 advance(":");
22385 nextInnerDE();
22386 } else if (id) {
22387 // in this case we are assigning (not declaring), so check assignment
22388 if (isAssignment) {
22389 checkLeftSideAssign(state.tokens.curr);
22390 }
22391 identifiers.push({ id: id, token: state.tokens.curr });
22392 }
22393 }
22394 };
22395
22396 var id, value;
22397 if (checkPunctuator(firstToken, "[")) {

Callers 1

Calls 7

checkPunctuatorFunction · 0.85
nextInnerDEFunction · 0.85
checkLeftSideAssignFunction · 0.85
advanceFunction · 0.70
expressionFunction · 0.70
identifierFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected