Various utilities for internal use in the library.
Consts
escapeTable = (data: [(0, 0, ""), (0, 0, ""), (0, 0, ""), (0, 0, ""), (0, 0, ""), (0, 0, ""), (0, 0, ""), (-8648592263744955225, 92, "\\"), (-4478592245859895240, 98, "\b"), (4641731221724435865, 114, "\r"), (-5340964688531826903, 47, "/"), (-8804310308688710565, 34, "\""), (8394969970134436156, 110, "\n"), (517012403755787147, 102, "\f"), (0, 0, ""), (-4708809695820797393, 116, "\t")], counter: 8)
- Source Edit
Procs
proc peekLineFromStart(s: Stream): string {....raises: [IOError, OSError], tags: [ReadIOEffect], forbids: [].}
- Source Edit
proc peekLineFromStart(s: string; at: int): string {....raises: [], tags: [], forbids: [].}
- Source Edit
Macros
macro getDiscriminants(a: typedesc): seq[string]
- return the discriminant keys Source Edit
macro initCaseObject(T: typedesc; discriminatorSetter): untyped
-
Does the minimum to construct a valid case object T.
- discriminatorSetter: called passing two arguments (key, typ) (key being the field name and typ the field type), last expression should be the value for the field. Only for discriminator fields.
macro isObjVariant(a: typedesc): bool
- Source Edit