Open stepan-mitkin opened 2 years ago
function badCycle(node) { var _20_col, _20_it, _20_length, _sw_17, child; _sw_17 = node.type; if (_sw_17 === "BlockStatement") { _20_it = 0; _20_col = node.body; _20_length = _20_col.length; while (true) { if (_20_it < _20_length) { child = _20_col[_20_it]; console.log(child) _20_it++; } else { break; } } } else { if (_sw_17 === "Program") { _20_it = 0; _20_col = node.body; _20_length = _20_col.length; while (true) { if (_20_it < _20_length) { child = _20_col[_20_it]; console.log(child) _20_it++; } } } else { return undefined } } }
If two case icons lead to a foreach loop an eternal cycle is produced.