nimskull
nimskull copied to clipboard
Add language specification for `finally` clause
Summary
This is an attempt at expanding the specification with tests for everything finally related. It's not in a mergeable state yet, but I thought that it might be useful already.
The additions to t06_procedure_calls.nim are more or less structured, while t07_finally.nim is currently more of a dumping ground for various test cases than anything else.
To-do:
- add more tests for interactions between
finallyand both{.inline.}and{.closure.}iterators - add documentation
- re-organize test cases
- file issues for test cases that fail / put them into separate files with "knownIssue" markings
- there are still missing cases
- it might make sense to add some kind of mini-DSL via macros, in order to write the test cases in a way that makes them easier to comprehend and modify. They're mostly just copy-and-pasted right now.
- a macro or script that auto-generates lots of different permutations might also be a good idea
I think I can work on this later on, after https://github.com/nim-works/nimskull/pull/476 and https://github.com/nim-works/nimskull/pull/135 are merged and general test cleanup is complete.
Sure, feel free to take this over. I believe the to-do list is still up-to-date.