Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eternal cycle under case #20

Open
stepan-mitkin opened this issue Dec 1, 2021 · 1 comment
Open

Eternal cycle under case #20

stepan-mitkin opened this issue Dec 1, 2021 · 1 comment

Comments

@stepan-mitkin
Copy link
Owner

If two case icons lead to a foreach loop an eternal cycle is produced.

@stepan-mitkin
Copy link
Owner Author

20211201114218

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 } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant