tparsefile.nim 266 B

123456789101112
  1. import macros
  2. static:
  3. let fn = "mparsefile.nim"
  4. var raised = false
  5. try:
  6. discard parseStmt(staticRead(fn), filename = fn)
  7. except ValueError as e:
  8. raised = true
  9. doAssert e.msg == "mparsefile.nim(4, 1) Error: invalid indentation"
  10. doAssert raised