Documentation
¶
Index ¶
- Constants
- func TryGetSourceMappingURL(lineInfo *LineInfo) string
- type Generator
- func (gen *Generator) AddGeneratedMapping(generatedLine int, generatedCharacter int) error
- func (gen *Generator) AddName(name string) NameIndex
- func (gen *Generator) AddNamedSourceMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, ...) error
- func (gen *Generator) AddSource(fileName string) SourceIndex
- func (gen *Generator) AddSourceMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, ...) error
- func (gen *Generator) RawSourceMap() *RawSourceMap
- func (gen *Generator) SetSourceContent(sourceIndex SourceIndex, content string) error
- func (gen *Generator) Sources() []string
- func (gen *Generator) String() string
- type LineInfo
- type Mapping
- type MappingsDecoder
- type NameIndex
- type RawSourceMap
- type Source
- type SourceIndex
Constants ¶
View Source
const ( MissingSource SourceIndex = -1 MissingName NameIndex = -1 MissingLineOrColumn int = -1 )
Variables ¶
This section is empty.
Functions ¶
func TryGetSourceMappingURL ¶
Tries to find the sourceMappingURL comment at the end of a file.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func (*Generator) AddGeneratedMapping ¶
Adds a mapping without source information
func (*Generator) AddNamedSourceMapping ¶
func (gen *Generator) AddNamedSourceMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, sourceLine int, sourceCharacter int, nameIndex NameIndex) error
Adds a mapping with source and name information
func (*Generator) AddSource ¶
func (gen *Generator) AddSource(fileName string) SourceIndex
Adds a source to the source map
func (*Generator) AddSourceMapping ¶
func (gen *Generator) AddSourceMapping(generatedLine int, generatedCharacter int, sourceIndex SourceIndex, sourceLine int, sourceCharacter int) error
Adds a mapping with source information
func (*Generator) RawSourceMap ¶
func (gen *Generator) RawSourceMap() *RawSourceMap
Gets the source map as a `RawSourceMap` object
func (*Generator) SetSourceContent ¶
func (gen *Generator) SetSourceContent(sourceIndex SourceIndex, content string) error
Sets the content for a source
type Mapping ¶
type Mapping struct { GeneratedLine int GeneratedCharacter int SourceIndex SourceIndex SourceLine int SourceCharacter int NameIndex NameIndex }
func (*Mapping) IsSourceMapping ¶
type MappingsDecoder ¶
type MappingsDecoder struct {
// contains filtered or unexported fields
}
func DecodeMappings ¶
func DecodeMappings(mappings string) *MappingsDecoder
func (*MappingsDecoder) Error ¶
func (d *MappingsDecoder) Error() error
func (*MappingsDecoder) MappingsString ¶
func (d *MappingsDecoder) MappingsString() string
func (*MappingsDecoder) Next ¶
func (d *MappingsDecoder) Next() (value *Mapping, done bool)
func (*MappingsDecoder) Pos ¶
func (d *MappingsDecoder) Pos() int
func (*MappingsDecoder) State ¶
func (d *MappingsDecoder) State() *Mapping
type RawSourceMap ¶
type SourceIndex ¶
type SourceIndex int
Click to show internal directories.
Click to hide internal directories.