tcommandindent.nim 594 B

1234567891011121314151617
  1. when false: # parse the following
  2. let foo = Obj(
  3. field1: proc (src: pointer, srcLen: Natural)
  4. {.nimcall, gcsafe, raises: [IOError, Defect].} =
  5. var file = FileOutputStream(s).file
  6. implementWrites s.buffers, src, srcLen, "FILE",
  7. writeStartAddr, writeLen,
  8. file.writeBuffer(writeStartAddr, writeLen)
  9. ,
  10. field2: proc {.nimcall, gcsafe, raises: [IOError, Defect].} =
  11. flushFile FileOutputStream(s).file
  12. ,
  13. field3: proc () {.nimcall, gcsafe, raises: [IOError, Defect].} =
  14. close FileOutputStream(s).file
  15. )