Expand description

Utilities for working with source code and printing nicely formatted diagnostic information like warnings and errors.

Optional Features

Extra functionality is accessible by enabling feature flags. The features currently available are:

  • serialization - Adds Serialize and Deserialize implementations for use with serde

Structs

A byte position in a source file.

A byte offset in a source file

A zero-indexed column offset into a source file

A 1-indexed column number. Useful for pretty printing source locations.

A column offset in a source file

A handle that points to a file in the database.

A database of source files.

A zero-indexed line offset into a source file

A 1-indexed line number. Useful for pretty printing source locations.

A line offset in a source file

A location in a source file.

Traits

Index types

A relative offset between two indices

Type Definitions

The raw, untyped index. We use a 32-bit integer here for space efficiency, assuming we won’t be working with sources larger than 4GB.

The raw, untyped offset.