| 165 | } |
| 166 | |
| 167 | func (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 | |
| 178 | func (d *MappingsDecoder) stopIterating() (*Mapping, bool) { |
| 179 | d.done = true |