Files
Nim/tests/parser/tcommandequals.nim
metagn 4ca2dcb404 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
2022-12-06 13:11:56 +01:00

18 lines
205 B
Nim

discard """
output: '''
5
'''
"""
proc foo(a, b: int) =
echo a + b
foo a = 2, b = 3
import macros
macro bar(args: varargs[untyped]): untyped =
doAssert args[0].kind == nnkExprEqExpr
bar "a" = 1