Module oak_runtime::str_stream [] [src]

Implementation of Stream for &'a str type. It implements all traits required by CharStream.

Structs

Range

A (half-open) range which is bounded at both ends: { x | start <= x < end }. Use start..end (two dots) for its shorthand.

Span

Spans represent a region of code, used for error reporting. Positions in spans are absolute positions from the beginning of the codemap, not positions relative to FileMaps. Methods on the CodeMap can be used to relate spans back to the original source. You must be careful if the span crosses more than one file - you will not be able to use many of the functions on spans in codemap and you cannot assume that the length of the span = hi - lo; there may be space in the BytePos range between files.

StrStream

Represents a stream from a &'a str. It implements all traits required by CharStream.