new genAst as replacement for quote do (#17426)

* new `macros.genAst`: fixes all issues with `quote do`
* add changelog entry
* add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669
* add test for #9607
* add kNoExposeLocalInjects option
* add test case for nested application of genAst
* genAst: automatically call newLit when needed
* allow skipping `{}`: genAst: foo
* add test that shows this fixes #11986
* add examples showing mixin; add examples showing passing types, macros, templates
* move to std/genasts
* improve docs
This commit is contained in:
Timothee Cour 2021-04-02 04:11:03 -07:00 • committed by GitHub
commit 9abd383a2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 416 additions and 1 deletions

View file

@ -255,6 +255,9 @@
- Added `hasClosure` to `std/typetraits`.
- Added `genasts.genAst` that avoids the problems inherent with `quote do` and can
be used as a replacement.
## Language changes
- `nimscript` now handles `except Exception as e`.