nimskull icon indicating copy to clipboard operation
nimskull copied to clipboard

Add language specification for `finally` clause

Open zerbina opened this issue 3 years ago • 2 comments

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 finally and 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

zerbina avatar Mar 18 '22 20:03 zerbina

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.

haxscramper avatar Nov 25 '22 12:11 haxscramper

Sure, feel free to take this over. I believe the to-do list is still up-to-date.

zerbina avatar Nov 25 '22 16:11 zerbina