updated the tester
This commit is contained in:
parent
051b9ca0ce
commit
16b15f360a
1 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ when not declared(parseCfgBool):
|
|||
case normalize(s)
|
||||
of "y", "yes", "true", "1", "on": result = true
|
||||
of "n", "no", "false", "0", "off": result = false
|
||||
else: raise newException(EInvalidValue, "cannot interpret as a bool: " & s)
|
||||
else: raise newException(ValueError, "cannot interpret as a bool: " & s)
|
||||
|
||||
proc extractSpec(filename: string): string =
|
||||
const tripleQuote = "\"\"\""
|
||||
|
|
@ -78,7 +78,7 @@ when not defined(nimhygiene):
|
|||
|
||||
template parseSpecAux(fillResult: stmt) {.immediate.} =
|
||||
var ss = newStringStream(extractSpec(filename))
|
||||
var p {.inject.}: TCfgParser
|
||||
var p {.inject.}: CfgParser
|
||||
open(p, ss, filename, 1)
|
||||
while true:
|
||||
var e {.inject.} = next(p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue