Struct codemap::CodeMap [] [src]

pub struct CodeMap { /* fields omitted */ }

A data structure recording source code files for position lookup.

Methods

impl CodeMap
[src]

Creates an empty CodeMap.

Adds a file with the given name and contents.

Use the returned File and its .span property to create Spans representing substrings of the file.

Looks up the File that contains the specified position.

Gets the file, line, and column represented by a Pos.

Gets the file and its line and column ranges represented by a Span.