src/print

  Source   Edit

Types

TableStyle = enum
  Fancy, Plain
  Source   Edit

Vars

printColors = isatty(stdout)
  Source   Edit
printWidth = terminalWidth()
  Source   Edit

Procs

proc escapeString(v: string; q = "\""): string {....raises: [], tags: [].}
  Source   Edit
proc newFieldPairNode(k, v: Node): Node {....raises: [], tags: [].}
  Source   Edit
proc newNameNode(name: string): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: bool): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: char): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: cstring): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: enum): Node
  Source   Edit
proc newNode(x: pointer): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: proc): Node
  Source   Edit
proc newNode(x: Rune): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: SomeNumber): Node
  Source   Edit
proc newNode(x: string): Node {....raises: [], tags: [].}
  Source   Edit
proc newNode(x: type): Node
  Source   Edit
proc newNode[K, V](x: Table[K, V]): Node
  Source   Edit
proc newNode[N, T](x: array[N, T]): Node
  Source   Edit
proc newNode[T: object](x: T): Node
  Source   Edit
proc newNode[T: tuple](x: T): Node
  Source   Edit
proc newNode[T](x: HashSet[T] | set[T]): Node
  Source   Edit
proc newNode[T](x: ptr T): Node
  Source   Edit
proc newNode[T](x: ptr UncheckedArray[T]): Node
  Source   Edit
proc newNode[T](x: ref T): Node
  Source   Edit
proc newNode[T](x: seq[T]): Node
  Source   Edit
proc newNodeFromBaseType(x: type): Node
  Source   Edit
proc newNodeFromBaseType[T](x: T): Node
  Source   Edit
proc newSupportNode(value: string): Node {....raises: [], tags: [].}
  Source   Edit
proc newTopPairNode(k, v: Node): Node {....raises: [], tags: [].}
  Source   Edit
proc printBarChart[N: SomeNumber](data: seq[(string, N)])
prints a bar chart like this: zpu: ######### 20.45 cpu: ################################################# 70.00 gpu: ########################### 45.56   Source   Edit
proc printNode(node: Node; indent: int) {....raises: [IOError, ValueError],
    tags: [WriteIOEffect].}
  Source   Edit
proc printNodes(s: varargs[Node]) {....raises: [IOError, ValueError],
                                    tags: [WriteIOEffect].}
  Source   Edit
proc printTable[T](arr: seq[T]; style = Fancy)
Given a list of items prints them as a table.   Source   Edit

Macros

macro rawPrint(n: varargs[untyped]): untyped
  Source   Edit

Templates

template fieldPairs2(x: untyped): untyped
  Source   Edit
template print(n: varargs[untyped]): untyped
  Source   Edit