Struct sourcemap::SourceMapBuilder [] [src]

pub struct SourceMapBuilder { /* fields omitted */ }

Helper for sourcemap generation

This helper exists because generating and modifying SourceMap objects is generally not very comfortable. As a general aid this type can help.

Methods

impl SourceMapBuilder
[src]

[src]

Creates a new source map builder and sets the file.

[src]

Sets the file for the sourcemap (optional)

[src]

Returns the currently set file.

[src]

Registers a new source with the builder and returns the source ID.

[src]

Changes the source name for an already set source.

[src]

Looks up a source name for an ID.

[src]

Sets the source contents for an already existing source.

[src]

Returns the current source contents for a source.

[src]

Checks if a given source ID has source contents available.

[src]

Loads source contents from locally accessible files if referenced accordingly. Returns the number of loaded source contents

[src]

Registers a name with the builder and returns the name ID.

[src]

Adds a new mapping to the builder.

[src]

Shortcut for adding a new mapping based of an already existing token, optionally removing the name.

[src]

Strips common prefixes from the sources in the builder

[src]

Converts the builder into a sourcemap.

Trait Implementations

Auto Trait Implementations