UNPKG

@bitloops/bl-transpiler

Version:
22 lines 1.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.boundedContextValidationError = exports.identifierValidationError = void 0; const IntermediateASTNode_js_1 = require("../../ast/core/intermediate-ast/nodes/IntermediateASTNode.js"); class identifierValidationError extends IntermediateASTNode_js_1.IntermediateASTNodeValidationError { constructor(name, node, bcName) { const bc = bcName ? ` in bounded context ${bcName}` : ''; const message = `Identifier ${name} not found${bc}: from ${node.getMetadata().start.line}:${node.getMetadata().start.column} to ${node.getMetadata().end.line}:${node.getMetadata().end.column} of file ${node.getMetadata().fileId}`; const metadata = node.getMetadata(); super(message, metadata); } } exports.identifierValidationError = identifierValidationError; class boundedContextValidationError extends IntermediateASTNode_js_1.IntermediateASTNodeValidationError { constructor(node) { const message = `Bounded Context ${node.getName()} not found: from ${node.getMetadata().start.line}:${node.getMetadata().start.column} to ${node.getMetadata().end.line}:${node.getMetadata().end.column} of file ${node.getMetadata().fileId}`; const metadata = node.getMetadata(); super(message, metadata); } } exports.boundedContextValidationError = boundedContextValidationError; //# sourceMappingURL=validationErrors.js.map