rod file viewer for easier debugging of rod files

This commit is contained in:
Araq 2013-04-04 13:05:38 +02:00
commit beb13ecf62
8 changed files with 303 additions and 21 deletions

View file

@ -1597,6 +1597,18 @@ proc `$`*[T: tuple|object](x: T): string =
result.add($value)
result.add(")")
proc `$`*[T: set](x: T): string =
## generic ``$`` operator for sets that is lifted from the components
## of `x`. Example:
##
## .. code-block:: nimrod
## ${23, 45} == "{23, 45}"
result = "{"
for value in items(x):
if result.len > 1: result.add(", ")
result.add($value)
result.add("}")
when false:
proc `$`*[T](a: openArray[T]): string =
## generic ``$`` operator for open arrays that is lifted from the elements