compiler/utils/idioms

  Source   Edit

This module implements various helper routines for idioms used throughout the compiler. Dependencies on other modules should be kept as minimal as possible

Types

HOslice[T] = object
  a*, b*: T
A half-open slice, that is, a slice where the end is excluded. These are useful for use with unsigned integers, as, compared to Slice, no special handling is required for empty slices.   Source   Edit

Procs

func len[T](x: HOslice[T]): int {.inline.}
Returns the number of items in the slice   Source   Edit

Iterators

iterator items[T](s: HOslice[T]): T
Returns all items in the slice   Source   Edit