Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
segment[1] - offsets.sourceIndex,
segment[2] - offsets.sourceCodeLine,
segment[3] - offsets.sourceCodeColumn
];
generatedCodeColumn = segment[0];
offsets.sourceIndex = segment[1];
offsets.sourceCodeLine = segment[2];
offsets.sourceCodeColumn = segment[3];
if ( ~segment[4] ) {
arr.push( segment[4] - offsets.sourceCodeName );
offsets.sourceCodeName = segment[4];
}
return encode( arr );
}).join( ',' );
}).join( ';' );
segment.sourceIndex - offsets.sourceIndex,
segment.sourceCodeLine - offsets.sourceCodeLine,
segment.sourceCodeColumn - offsets.sourceCodeColumn
];
generatedCodeColumn = segment.generatedCodeColumn;
offsets.sourceIndex = segment.sourceIndex;
offsets.sourceCodeLine = segment.sourceCodeLine;
offsets.sourceCodeColumn = segment.sourceCodeColumn;
if ( ~segment.sourceCodeName ) {
arr.push( segment.sourceCodeName - offsets.sourceCodeName );
offsets.sourceCodeName = segment.sourceCodeName;
}
return vlq.encode( arr );
}).join( ',' );
}).join( ';' );
var columnDiff = start.column - end.column;
if (lineDiff) {
for (var l = 0; l !== lineDiff; l++) {
mappings += ';';
}
mappings += vlq.encode([ start.column, 0, lineDiff, columnDiff ]);
} else if (columnDiff) {
if (i) {
mappings += ',';
}
mappings += vlq.encode([ columnDiff, 0, lineDiff, columnDiff ]);
}
end = removedNodes[i].loc.end;
mappings += ',';
mappings += vlq.encode([ 0, 0, end.line - start.line, end.column - start.column ]);
}
return mappings;
}
return i.map(function(j) {
return vlq.encode(j);
}).join(',');
}).join(';')
var mappings = '';
if (!removedNodes || removedNodes.length === '') {
return mappings;
}
var end = { line: 1, column: 0 };
for (var i = 0; i < removedNodes.length; i++) {
var start = removedNodes[i].loc.start;
var lineDiff = start.line - end.line;
var columnDiff = start.column - end.column;
if (lineDiff) {
for (var l = 0; l !== lineDiff; l++) {
mappings += ';';
}
mappings += vlq.encode([ start.column, 0, lineDiff, columnDiff ]);
} else if (columnDiff) {
if (i) {
mappings += ',';
}
mappings += vlq.encode([ columnDiff, 0, lineDiff, columnDiff ]);
}
end = removedNodes[i].loc.end;
mappings += ',';
mappings += vlq.encode([ 0, 0, end.line - start.line, end.column - start.column ]);
}
return mappings;
}
}
result[1] = segment[1] - offsets.sourceFileIndex;
result[2] = segment[2] - offsets.sourceCodeLine;
result[3] = segment[3] - offsets.sourceCodeColumn;
offsets.sourceFileIndex = segment[1];
offsets.sourceCodeLine = segment[2];
offsets.sourceCodeColumn = segment[3];
if ( segment.length === 5 ) {
result[4] = segment[4] - offsets.nameIndex;
offsets.nameIndex = segment[4];
}
return encode( result );
}
}
segment[1] - offsets.sourceIndex,
segment[2] - offsets.sourceCodeLine,
segment[3] - offsets.sourceCodeColumn
];
generatedCodeColumn = segment[0];
offsets.sourceIndex = segment[1];
offsets.sourceCodeLine = segment[2];
offsets.sourceCodeColumn = segment[3];
if ( ~segment[4] ) {
arr.push( segment[4] - offsets.sourceCodeName );
offsets.sourceCodeName = segment[4];
}
return vlq.encode( arr );
}).join( ',' );
}).join( ';' );
segment[1] - offsets.sourceIndex,
segment[2] - offsets.sourceCodeLine,
segment[3] - offsets.sourceCodeColumn
];
generatedCodeColumn = segment[0];
offsets.sourceIndex = segment[1];
offsets.sourceCodeLine = segment[2];
offsets.sourceCodeColumn = segment[3];
if ( ~segment[4] ) {
arr.push( segment[4] - offsets.sourceCodeName );
offsets.sourceCodeName = segment[4];
}
return vlq.encode( arr );
}).join( ',' );
}).join( ';' );
segment.sourceIndex - offsets.sourceIndex,
segment.sourceCodeLine - offsets.sourceCodeLine,
segment.sourceCodeColumn - offsets.sourceCodeColumn
];
generatedCodeColumn = segment.generatedCodeColumn;
offsets.sourceIndex = segment.sourceIndex;
offsets.sourceCodeLine = segment.sourceCodeLine;
offsets.sourceCodeColumn = segment.sourceCodeColumn;
if ( ~segment.sourceCodeName ) {
arr.push( segment.sourceCodeName - offsets.sourceCodeName );
offsets.sourceCodeName = segment.sourceCodeName;
}
return encode( arr );
}).join( ',' );
}).join( ';' ) + getSemis(outro);
segment[1] - offsets.sourceIndex,
segment[2] - offsets.sourceCodeLine,
segment[3] - offsets.sourceCodeColumn
];
generatedCodeColumn = segment[0];
offsets.sourceIndex = segment[1];
offsets.sourceCodeLine = segment[2];
offsets.sourceCodeColumn = segment[3];
if ( ~segment[4] ) {
arr.push( segment[4] - offsets.sourceCodeName );
offsets.sourceCodeName = segment[4];
}
return vlq.encode( arr );
}).join( ',' );
}).join( ';' );