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

Function destructuringAssignOrJsonValue

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

Source from the content-addressed store, hash-verified

23954
23955 // Check whether this function has been reached for a destructuring assign with undeclared values
23956 function destructuringAssignOrJsonValue() {
23957 // lookup for the assignment (ECMAScript 6 only)
23958 // if it has semicolons, it is a block, so go parse it as a block
23959 // or it's not a block, but there are assignments, check for undeclared variables
23960
23961 var block = lookupBlockType();
23962 if (block.notJson) {
23963 if (!state.inES6() && block.isDestAssign) {
23964 warning("W104", state.tokens.curr, "destructuring assignment", "6");
23965 }
23966 statements();
23967 // otherwise parse json value
23968 } else {
23969 state.option.laxbreak = true;
23970 state.jsonMode = true;
23971 jsonValue();
23972 }
23973 }
23974
23975 // array comprehension parsing function
23976 // parses and defines the three states of the list comprehension in order

Callers 1

itselfFunction · 0.85

Calls 4

lookupBlockTypeFunction · 0.85
warningFunction · 0.85
statementsFunction · 0.85
jsonValueFunction · 0.85

Tested by

no test coverage detected