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)
|
case normalize(s)
|
||||||
of "y", "yes", "true", "1", "on": result = true
|
of "y", "yes", "true", "1", "on": result = true
|
||||||
of "n", "no", "false", "0", "off": result = false
|
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 =
|
proc extractSpec(filename: string): string =
|
||||||
const tripleQuote = "\"\"\""
|
const tripleQuote = "\"\"\""
|
||||||
|
|
@ -78,7 +78,7 @@ when not defined(nimhygiene):
|
||||||
|
|
||||||
template parseSpecAux(fillResult: stmt) {.immediate.} =
|
template parseSpecAux(fillResult: stmt) {.immediate.} =
|
||||||
var ss = newStringStream(extractSpec(filename))
|
var ss = newStringStream(extractSpec(filename))
|
||||||
var p {.inject.}: TCfgParser
|
var p {.inject.}: CfgParser
|
||||||
open(p, ss, filename, 1)
|
open(p, ss, filename, 1)
|
||||||
while true:
|
while true:
|
||||||
var e {.inject.} = next(p)
|
var e {.inject.} = next(p)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue