(newState)
| 1251 | } |
| 1252 | |
| 1253 | function countBlocks (newState) { |
| 1254 | // TODO: this should probably count nested blocks, arguments, also account for taller blocks. But, not important with auto blockly.cleanUp() function. |
| 1255 | let count = 0 |
| 1256 | while (newState?.next) { |
| 1257 | ++count |
| 1258 | newState = newState.next.block |
| 1259 | } |
| 1260 | return count |
| 1261 | } |
| 1262 | |
| 1263 | const filterBlocklyState = function (blocklyState, blockType) { |
| 1264 | // Stubs out all blocks of the given type from the blockly state. Useful for not throwing away all code just because a block definition is missing. |
no outgoing calls
no test coverage detected