add comments

This commit is contained in:
David Aurelio 2016-12-16 01:12:50 +00:00
parent 4cb7e5009a
commit 2907d663dc
2 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,8 @@ export default class Buffer {
};
if (map) {
// The `.map` property is lazy to allow callers to use the raw mappings
// without any overhead
Object.defineProperty(result, "map", {
configurable: true,
enumerable: true,

View File

@ -70,6 +70,8 @@ export default class SourceMap {
this._lastSourceLine = line;
this._lastSourceColumn = column;
// We are deliberately not using the `source-map` library here to allow
// callers to use these mappings without any overhead
this._rawMappings.push({
// undefined to allow for more compact json serialization
name: identifierName || undefined,