@bitloops/bl-transpiler
Version:
The one and only Bitloops Language transpiler
17 lines • 1.12 kB
JavaScript
import { IntermediateASTNodeValidationError } from '../../ast/core/intermediate-ast/nodes/IntermediateASTNode.js';
export class identifierValidationError extends 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);
}
}
export class boundedContextValidationError extends 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);
}
}
//# sourceMappingURL=validationErrors.js.map