UNPKG

@informalsystems/quint

Version:

Core tool for the Quint specification language

55 lines 1.97 kB
"use strict"; /* ---------------------------------------------------------------------------------- * Copyright 2022-2023 Informal Systems * Licensed under the Apache License, Version 2.0. * See LICENSE in the project root for license information. * --------------------------------------------------------------------------------- */ Object.defineProperty(exports, "__esModule", { value: true }); exports.paramIsNotAConstantError = exports.paramNotFoundError = exports.nameNotFoundError = exports.moduleNotFoundError = exports.selfReferenceError = void 0; function selfReferenceError(def) { const verb = def.kind === 'instance' ? 'instantiate' : def.kind; return { code: 'QNT407', message: `Cannot ${verb} '${def.protoName}' inside '${def.protoName}'`, reference: def.id, data: {}, }; } exports.selfReferenceError = selfReferenceError; function moduleNotFoundError(def) { return { code: 'QNT405', message: `Module '${def.protoName}' not found`, reference: def.id, data: {}, }; } exports.moduleNotFoundError = moduleNotFoundError; function nameNotFoundError(def) { return { code: 'QNT404', message: `Name '${def.protoName}::${def.defName}' not found`, reference: def.id, data: {}, }; } exports.nameNotFoundError = nameNotFoundError; function paramNotFoundError(def, param) { return { code: 'QNT406', message: `Instantiation error: '${param.name}' not found in '${def.protoName}'`, reference: def.id, data: {}, }; } exports.paramNotFoundError = paramNotFoundError; function paramIsNotAConstantError(def, param) { return { code: 'QNT406', message: `Instantiation error: '${param.name}' is not a constant in '${def.protoName}'`, reference: def.id, data: {}, }; } exports.paramIsNotAConstantError = paramIsNotAConstantError; //# sourceMappingURL=importErrors.js.map