deleted web and dist
This commit is contained in:
parent
07d5a8085b
commit
972c510861
50 changed files with 4986 additions and 2289 deletions
25
tests/tparscfg.nim
Normal file
25
tests/tparscfg.nim
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
import
|
||||
os, parsecfg, strutils
|
||||
|
||||
var
|
||||
p: TCfgParser
|
||||
|
||||
if open(p, paramStr(1)):
|
||||
while true:
|
||||
var e = next(p)
|
||||
case e.kind
|
||||
of cfgEof:
|
||||
echo("EOF!")
|
||||
break
|
||||
of cfgSectionStart: ## a ``[section]`` has been parsed
|
||||
echo("new section: " & e.section)
|
||||
of cfgKeyValuePair:
|
||||
echo("key-value-pair: " & e.key & ": " & e.value)
|
||||
of cfgOption:
|
||||
echo("command: " & e.key & ": " & e.value)
|
||||
of cfgError:
|
||||
echo(e.msg)
|
||||
close(p)
|
||||
else:
|
||||
echo("cannot open: " & paramStr(1))
|
||||
Loading…
Add table
Add a link
Reference in a new issue