import type { InputMismatchException, LexerNoViableAltException, NoViableAltException } from "antlr4ts"; import type { FailedPredicateException } from "antlr4ts/FailedPredicateException"; import type { RecognitionException } from "antlr4ts/RecognitionException"; import type { Recognizer } from "antlr4ts/Recognizer"; import type { CompilableASTNode, KipperFileStream, KipperProgramContext } from "./compiler"; export interface TracebackMetadata { location: { line: number | undefined; col: number | undefined; }; filePath: string | undefined; tokenSrc: string | undefined; streamSrc: KipperFileStream | undefined; errorNode: CompilableASTNode | undefined; } export declare class KipperError extends Error { tracebackData: TracebackMetadata; cause?: KipperError; constructor(msg: string, cause?: KipperError); setTracebackData(traceback: TracebackMetadata): void; getTraceback(): string; get line(): number | undefined; get col(): number | undefined; get filePath(): string | undefined; get tokenSrc(): string | undefined; get programCtx(): KipperProgramContext | undefined; } export declare class KipperConfigError extends KipperError { constructor(msg: string); } export declare class KipperInternalError extends Error { constructor(msg: string); } export declare class ASTFactoryError extends KipperInternalError { constructor(msg?: string); } export declare class UnableToDetermineSemanticDataError extends KipperInternalError { constructor(); } export declare class UndefinedSemanticsError extends KipperInternalError { constructor(); } export declare class UndefinedDeclarationCtxError extends KipperInternalError { constructor(); } export declare class UnableToGetInnerScopeError extends KipperInternalError { constructor(); } export declare class TypeNotCompilableError extends KipperInternalError { constructor(); } export declare class TypeCanNotBeUsedForTypeCheckingError extends KipperInternalError { constructor(); } export declare class MissingRequiredSemanticDataError extends KipperInternalError { constructor(msg?: string); } export declare class GenericCanOnlyHaveOneSpreadError extends KipperInternalError { constructor(); } export declare class DuplicateUniverseKeyError extends KipperInternalError { constructor(key: string); } export declare class KipperNotImplementedError extends KipperError { constructor(msg: string); } export declare class KipperSyntaxError extends KipperError { constructor(msg: string); } export declare class InvalidReturnStatementError extends KipperSyntaxError { constructor(); } export declare class InvalidJumpStatementError extends KipperSyntaxError { constructor(); } export declare class MissingFunctionBodyError extends KipperSyntaxError { constructor(); } export declare class InvalidUnaryExpressionOperandError extends KipperSyntaxError { constructor(); } export declare class LexerOrParserSyntaxError extends KipperSyntaxError { private readonly _recognizer; private readonly _offendingSymbol; private readonly _msg; private readonly _error; constructor(recognizer: Recognizer, offendingSymbol: Token | undefined, msg: string, error: RecognitionException | NoViableAltException | LexerNoViableAltException | InputMismatchException | FailedPredicateException | undefined); get recognizer(): Recognizer; get offendingSymbol(): Token | undefined; get msg(): string; get error(): RecognitionException | NoViableAltException | LexerNoViableAltException | InputMismatchException | FailedPredicateException | undefined; } export declare class InvalidGlobalError extends KipperError { constructor(identifier: string); } export declare class BuiltInOrInternalGeneratorFunctionNotFoundError extends KipperError { constructor(identifier: string); } export declare abstract class IdentifierError extends KipperError { protected constructor(msg: string); } export declare class UndefinedReferenceError extends IdentifierError { constructor(reference: string); } export declare class UnknownReferenceError extends IdentifierError { constructor(identifier: string); } export declare class IdentifierAlreadyUsedByVariableError extends IdentifierError { constructor(identifier: string); } export declare class IdentifierAlreadyUsedByFunctionError extends IdentifierError { constructor(identifier: string); } export declare class IdentifierAlreadyUsedByMemberError extends IdentifierError { constructor(identifier: string, kind: "interface" | "class"); } export declare class IdentifierAlreadyUsedByParameterError extends IdentifierError { constructor(identifier: string); } export declare class BuiltInOverwriteError extends IdentifierError { constructor(identifier: string); } export declare class ReservedIdentifierOverwriteError extends IdentifierError { constructor(identifier: string); } export declare class TypeError extends KipperError { constructor(msg: string, cause?: TypeError); } export declare class ArithmeticOperationTypeError extends TypeError { constructor(firstType?: string, secondType?: string); } export declare class BitwiseOperationTypeError extends TypeError { constructor(firstType: string, secondType: string); } export declare class ArgumentAssignmentTypeError extends TypeError { constructor(paramIdentifier: string, expectedType: string, receivedType: string, cause?: TypeError); } export declare class AssignmentTypeError extends TypeError { constructor(expectedType: string, receivedType: string, cause?: TypeError); static formatGenericTypes(identifier: string, genericTypes?: Array): string; } export declare class PropertyAssignmentTypeError extends TypeError { constructor(identifier: string, propertyType: string, valueType: string, cause?: TypeError); } export declare class PropertyNotFoundTypeError extends TypeError { constructor(thisType: string, objType: string, identifier: string); } export declare class GenericArgumentTypeError extends TypeError { constructor(identifier: string, expectedType: string, receivedType: string, cause?: TypeError); } export declare class MismatchingArgCountBetweenFuncTypesTypeError extends TypeError { constructor(expected: number, received: number); } export declare class InvalidAmountOfGenericArgumentsError extends TypeError { constructor(typeIdentifier: string, expected: number, received: number, spreadPresent: boolean); } export declare class CanNotUseNonGenericAsGenericTypeError extends TypeError { constructor(identifier: string); } export declare class TypeNotAssignableToUnionError extends TypeError { constructor(type: string, unionType: Array, cause?: TypeError); } export declare class ReadOnlyWriteTypeError extends TypeError { constructor(identifier: string); } export declare class InvalidConversionTypeError extends TypeError { constructor(originalType: string, destType: string); } export declare class UnknownTypeTypeError extends TypeError { constructor(type: string); } export declare class ReferenceCanNotBeUsedAsTypeError extends TypeError { constructor(identifier: string); } export declare class InvalidRelationalComparisonTypeError extends TypeError { constructor(type1: string, type2: string); } export declare class InvalidTypeofOperandError extends TypeError { constructor(type: string); } export declare class InvalidUnaryExpressionTypeError extends TypeError { constructor(operator: string, type: string); } export declare class ExpressionNotCallableError extends TypeError { constructor(type: string); } export declare class IncompleteReturnsInCodePathsError extends TypeError { constructor(); } export declare class ValueNotIndexableTypeError extends TypeError { constructor(type: string); } export declare class ValueTypeNotIndexableWithGivenAccessor extends TypeError { constructor(type: string, accessType: string); } export declare class InvalidKeyTypeError extends TypeError { constructor(objType: string, keyType: string); } export declare class PropertyDoesNotExistError extends TypeError { constructor(objType: string, identifier: string); } export declare class InvalidInstanceOfTypeError extends TypeError { constructor(type: string); } export declare class InvalidMatchesTypeError extends TypeError { constructor(type: string); } export declare class UndefinedConstantError extends KipperError { constructor(msg: string); } export declare class InvalidAssignmentError extends KipperError { constructor(msg: string); } export declare class ArgumentError extends KipperError { constructor(msg: string); } export declare class InvalidAmountOfArgumentsError extends ArgumentError { constructor(func: string, expected: number, received: number); }