Skip to content

Commit 5082e87

Browse files
metagncapocasa
authored andcommitted
Named arguments in commands + many grammar fixes (nim-lang#20994)
* Breaking parser changes, implement nim-lang/RFCs#442 Types are separated from expressions and better reflected in the grammar. * add test * more accurate grammar * fix keyword typedescs * accept expressions in proc argument lists * CI "fixes" * fixes * allow full ref expressions again, adapt old tests * cleanup, fix some tests * improve grammar, try and revert semtypes change * restrict sigil binding to identOrLiteral * fix, should have caught this immediately * add changelog entry, fix double not nil bug * correct grammar * change section * fix * real fix hopefully * fix test * support LL(1) for tuples * make grammar.txt too
1 parent 433286a commit 5082e87

18 files changed

+283
-147
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@
8080
- Removed two type pragma syntaxes deprecated since 0.20, namely
8181
`type Foo = object {.final.}`, and `type Foo {.final.} [T] = object`.
8282

83+
- `foo a = b` now means `foo(a = b)` rather than `foo(a) = b`. This is consistent
84+
with the existing behavior of `foo a, b = c` meaning `foo(a, b = c)`.
85+
This decision was made with the assumption that the old syntax was used rarely;
86+
if your code used the old syntax, please be aware of this change.
87+
8388
- [Overloadable enums](https://nim-lang.github.io/Nim/manual.html#overloadable-enum-value-names) and Unicode Operators
8489
are no longer experimental.
8590

0 commit comments

Comments
 (0)