nimsuggest supports prefix matching (first version)

This commit is contained in:
Araq
2017-02-28 09:03:40 +01:00
parent e78bd69619
commit 3d46600a90
6 changed files with 126 additions and 174 deletions

View File

@@ -380,8 +380,7 @@ macro expect*(exceptions: varargs[typed], body: untyped): untyped =
## expect IOError, OSError, ValueError, AssertionError:
## defectiveRobot()
let exp = callsite()
template expectBody(errorTypes, lineInfoLit: expr,
body: stmt): NimNode {.dirty.} =
template expectBody(errorTypes, lineInfoLit, body): NimNode {.dirty.} =
try:
body
checkpoint(lineInfoLit & ": Expect Failed, no exception was thrown.")