mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* 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
17 lines
594 B
Nim
17 lines
594 B
Nim
when false: # parse the following
|
|
let foo = Obj(
|
|
field1: proc (src: pointer, srcLen: Natural)
|
|
{.nimcall, gcsafe, raises: [IOError, Defect].} =
|
|
var file = FileOutputStream(s).file
|
|
|
|
implementWrites s.buffers, src, srcLen, "FILE",
|
|
writeStartAddr, writeLen,
|
|
file.writeBuffer(writeStartAddr, writeLen)
|
|
,
|
|
field2: proc {.nimcall, gcsafe, raises: [IOError, Defect].} =
|
|
flushFile FileOutputStream(s).file
|
|
,
|
|
field3: proc () {.nimcall, gcsafe, raises: [IOError, Defect].} =
|
|
close FileOutputStream(s).file
|
|
)
|