()
| 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 |
no test coverage detected