Named arguments in commands + many grammar fixes (#20994)

* Breaking parser changes, implement https://github.com/nim-lang/RFCs/issues/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
This commit is contained in:
metagn 2022-12-06 15:11:56 +03:00 • committed by GitHub
commit 4ca2dcb404
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 285 additions and 149 deletions

View file

@ -1,6 +1,6 @@
discard """
errormsg: "type mismatch: got <Thin[system.int]>"
nimout: '''t7600_1.nim(21, 6) Error: type mismatch: got <Thin[system.int]>
nimout: '''t7600_1.nim(21, 1) Error: type mismatch: got <Thin[system.int]>
but expected one of:
proc test[T](x: Paper[T])
first type mismatch at position: 1

View file

@ -1,6 +1,6 @@
discard """
errormsg: "type mismatch: got <Thin>"
nimout: '''t7600_2.nim(20, 6) Error: type mismatch: got <Thin>
nimout: '''t7600_2.nim(20, 1) Error: type mismatch: got <Thin>
but expected one of:
proc test(x: Paper)
first type mismatch at position: 1