UNPKG

plaxtony

Version:

Static code analysis of SC2 Galaxy Script

26 lines 872 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createFileDiagnostic = void 0; class Diagnostic { constructor(file, code, messageText, start, length) { this.file = file; this.code = code; this.messageText = messageText; this.start = start; this.length = length; } toString() { var _a; return `${(_a = this.file) === null || _a === void 0 ? void 0 : _a.fileName} [${this.start}]: ${this.messageText}`.toString(); } } function createFileDiagnostic(file, start, length, message, tags) { // const end = start + length; const d = new Diagnostic(file, message.code, message.message, start, length); if (tags) { d.tags = tags.concat(); } return d; } exports.createFileDiagnostic = createFileDiagnostic; //# sourceMappingURL=diagnostics.js.map