assemblyscript
assemblyscript copied to clipboard
[WIP] implement for..of loops and iterators
- [x] I've read the contributing guidelines
This PR implements for..of loops as well as iterators, which are important (convenience) features when writing code in assemblyscript.
The optimal solution would be to use Symbol.iterator, however symbols (and the api itself) are not yet implemented by the compiler.
Instead, this PR uses a different approach: a new decorator, @iterator.
TODO:
- [ ] Add tests
- [x] Run
npm checkandnpm testto make sure the code is fine
I'm getting some memory leaks, but they are unrelated to the added code - they exist even when writing similar code by hand somehow.
I disabled rtrace for this test temporarily
This PR has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!
This PR has been automatically closed due to lack of recent activity, but feel free to reopen it as long as you merge in the main branch afterwards.