"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Formatter_1 = require("../common/Formatter");
var Formatter = (function (_super) {
    __extends(Formatter, _super);
    function Formatter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Formatter.prototype._getSource = function (tracepath) {
        if (tracepath === '<anonymous>') {
            return 'anonymous';
        }
        var match = /^(.*?):(\d+)(:\d+)?$/.exec(tracepath);
        if (!match) {
            return tracepath;
        }
        tracepath = match[1];
        var line = Number(match[2]);
        var col = match[3] ? Number(match[3].substring(1)) : null;
        return tracepath + ':' + line + (col == null ? '' : ':' + col);
    };
    return Formatter;
}(Formatter_1.default));
exports.default = Formatter;
//# sourceMappingURL=Formatter.js.map