MCPcopy Create free account
hub / github.com/microsoft/typescript-go / captureMapping

Method captureMapping

internal/sourcemap/decoder.go:167–176  ·  view source on GitHub ↗
(hasSource bool, hasName bool)

Source from the content-addressed store, hash-verified

165}
166
167func (d *MappingsDecoder) captureMapping(hasSource bool, hasName bool) *Mapping {
168 mapping := d.mappingArena.New()
169 mapping.GeneratedLine = d.generatedLine
170 mapping.GeneratedCharacter = d.generatedCharacter
171 mapping.SourceIndex = core.IfElse(hasSource, d.sourceIndex, MissingSource)
172 mapping.SourceLine = core.IfElse(hasSource, d.sourceLine, MissingLineOrColumn)
173 mapping.SourceCharacter = core.IfElse(hasSource, d.sourceCharacter, MissingUTF16Column)
174 mapping.NameIndex = core.IfElse(hasName, d.nameIndex, MissingName)
175 return mapping
176}
177
178func (d *MappingsDecoder) stopIterating() (*Mapping, bool) {
179 d.done = true

Callers 2

StateMethod · 0.95
NextMethod · 0.95

Calls 2

IfElseFunction · 0.92
NewMethod · 0.80

Tested by

no test coverage detected