UNPKG

572 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Diagnostics = void 0;
4class Diagnostics {
5 constructor(reports = []) {
6 this.reports = reports;
7 }
8 add(type, node, message, options = {}) {
9 this.reports.push({ type, node, message, options });
10 }
11 error(node, message, options) {
12 this.add('error', node, message, options);
13 }
14 warn(node, message, options) {
15 this.add('warning', node, message, options);
16 }
17}
18exports.Diagnostics = Diagnostics;
19//# sourceMappingURL=diagnostics.js.map
\No newline at end of file