parser support anon iterators

This commit is contained in:
Araq 2014-01-20 20:07:44 +01:00
commit 4a0aadef4d
8 changed files with 61 additions and 13 deletions

15
tests/parser/tinvwhen.nim Normal file
View file

@ -0,0 +1,15 @@
discard """
file: "tinvwhen.nim"
line: 11
errormsg: "invalid indentation"
"""
# This was parsed even though it should not!
proc chdir(path: cstring): cint {.importc: "chdir", header: "dirHeader".}
proc getcwd(buf: cstring, buflen: cint): cstring
when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
else: {.error: "os library not ported to your OS. Please help!".}