diff options
author | Araq <rumpf_a@web.de> | 2012-08-20 01:13:13 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-08-20 01:13:13 +0200 |
commit | 5e15dec1757e6013cbeb5d6baf9d9579cf025361 (patch) | |
tree | 2157b7f03f5f596060ad9ed52427118964912e50 /tests/tester.nim | |
parent | 0cac8d9b6fa2c982468899db109a964df979b186 (diff) | |
download | Nim-5e15dec1757e6013cbeb5d6baf9d9579cf025361.tar.gz |
first steps to make templates hygienic
Diffstat (limited to 'tests/tester.nim')
-rwxr-xr-x | tests/tester.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tester.nim b/tests/tester.nim index 725e76ead..8c9f7f782 100755 --- a/tests/tester.nim +++ b/tests/tester.nim @@ -62,12 +62,15 @@ proc extractSpec(filename: string): string = #echo "warning: file does not contain spec: " & filename result = "" +when not defined(nimhygiene): + {.pragma: inject.} + template parseSpecAux(fillResult: stmt) = var ss = newStringStream(extractSpec(filename)) - var p: TCfgParser + var p {.inject.}: TCfgParser open(p, ss, filename, 1) while true: - var e = next(p) + var e {.inject.} = next(p) case e.kind of cfgEof: break of cfgSectionStart, cfgOption, cfgError: |