add custom pragma support for var and let symbols (#9582)
* add custom pragma support for var and let symbols * updated changelog for custom pragmas on var and let symbols * add oldast switch for backwards compatibility
This commit is contained in:
parent
139fa396e8
commit
044cef152f
9 changed files with 77 additions and 20 deletions
10
changelog.md
10
changelog.md
|
|
@ -23,7 +23,8 @@
|
|||
- The undocumented ``#? strongSpaces`` parsing mode has been removed.
|
||||
- The `not` operator is now always a unary operator, this means that code like
|
||||
``assert not isFalse(3)`` compiles.
|
||||
|
||||
- `getImpl` on a `var` or `let` symbol will now return the full `IdentDefs`
|
||||
tree from the symbol declaration instead of just the initializer portion.
|
||||
|
||||
#### Breaking changes in the standard library
|
||||
|
||||
|
|
@ -133,8 +134,9 @@ proc enumToString*(enums: openArray[enum]): string =
|
|||
the `gcsafe` pragma block.
|
||||
- added os.getCurrentProcessId()
|
||||
- User defined pragmas are now allowed in the pragma blocks
|
||||
- Pragma blocks are now longer eliminated from the typed AST tree to preserve
|
||||
- Pragma blocks are no longer eliminated from the typed AST tree to preserve
|
||||
pragmas for further analysis by macros
|
||||
- Custom pragmas are now supported for `var` and `let` symbols.
|
||||
|
||||
### Language changes
|
||||
|
||||
|
|
@ -143,10 +145,10 @@ proc enumToString*(enums: openArray[enum]): string =
|
|||
it's more recognizable and allows tools like github to recognize it as Nim,
|
||||
see [#9647](https://github.com/nim-lang/Nim/issues/9647).
|
||||
The previous extension will continue to work.
|
||||
- Pragma syntax is now consistent. Previous syntax where type pragmas did not
|
||||
- Pragma syntax is now consistent. Previous syntax where type pragmas did not
|
||||
follow the type name is now deprecated. Also pragma before generic parameter
|
||||
list is deprecated to be consistent with how pragmas are used with a proc. See
|
||||
[#8514](https://github.com/nim-lang/Nim/issues/8514) and
|
||||
[#8514](https://github.com/nim-lang/Nim/issues/8514) and
|
||||
[#1872](https://github.com/nim-lang/Nim/issues/1872) for further details.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue