Struct codemap::CodeMap [] [src]

pub struct CodeMap { /* fields omitted */ }

A data structure recording source code files for position lookup.

Methods

impl CodeMap
[src]

[src]

Creates an empty CodeMap.

[src]

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.

[src]

Looks up the File that contains the specified position.

[src]

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

[src]

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