new XML modules

This commit is contained in:
Andreas Rumpf 2010-02-10 03:21:03 +01:00
commit f721ddd75b
11 changed files with 731 additions and 93 deletions

View file

@ -127,13 +127,13 @@ template `=~` *(s: string, pattern: TRegEx): expr =
##
## if line =~ re"\s*(\w+)\s*\=\s*(\w+)":
## # matches a key=value pair:
## echo("Key: ", matches[1])
## echo("Value: ", matches[2])
## echo("Key: ", matches[0])
## echo("Value: ", matches[1])
## elif line =~ re"\s*(\#.*)":
## # matches a comment
## # note that the implicit ``matches`` array is different from the
## # ``matches`` array of the first branch
## echo("comment: ", matches[1])
## echo("comment: ", matches[0])
## else:
## echo("syntax error")
##