/** * Error classes for QASM parsing and validation * * This module provides specific error types for different parsing failures, * enabling precise error handling and debugging. Each error includes contextual * information about where the error occurred in the source code. * * @module Error Handling */ /** Class representing a bad argument exception. */ declare class BadArgumentError extends Error { constructor(message?: string); } /** Class representing a bad include statement */ declare class BadIncludeError extends Error { constructor(message?: string); } /** Class representing a bad quantum register exception. */ declare class BadQregError extends Error { constructor(message?: string); } /** Class representing a bad equality exception. */ declare class BadEqualsError extends Error { constructor(message?: string); } /** Class representing a bad classical register exception. */ declare class BadCregError extends Error { constructor(message?: string); } /** Class representing a bad conditional exception. */ declare class BadConditionalError extends Error { constructor(message?: string); } /** Class representing a bad barrier exception. */ declare class BadBarrierError extends Error { constructor(message?: string); } /** Class representing a bad measurement exception. */ declare class BadMeasurementError extends Error { constructor(message?: string); } /** Class representing a bad gate exception. */ declare class BadGateError extends Error { constructor(message?: string); } /** Class representing a bad parameter exception. */ declare class BadParameterError extends Error { constructor(message?: string); } /** Class representing a missing semicolon exception. */ declare class MissingSemicolonError extends Error { constructor(message?: string); } /** Class representing a missing opening or closing parenthesis, bracket, or curly brakcet. */ declare class MissingBraceError extends Error { constructor(message?: string); } /** Class representing an unsupported OpenQASM version exception. */ declare class UnsupportedOpenQASMVersionError extends Error { constructor(message?: string); } /** Class representing an error parsing an expected string literal. */ declare class BadStringLiteralError extends Error { constructor(message?: string); } /** Class representing an error parsing scalar types. */ declare class BadClassicalTypeError extends Error { constructor(message?: string); } /** Class representing an error parsing an expression. */ declare class BadExpressionError extends Error { constructor(message?: string); } /** Class representing an error in defining or calling a custom subroutine. */ declare class BadSubroutineError extends Error { constructor(message?: string); } /** Class representing a bad loop statement declaration. */ declare class BadLoopError extends Error { constructor(message?: string); } /** Class representing a bad quantum instruction. */ declare class BadQuantumInstructionError extends Error { constructor(message?: string); } /** Type for returning an error constructor. */ type ReturnErrorConstructor = new (message?: string) => Error; export { BadArgumentError, BadIncludeError, BadCregError, BadQregError, BadConditionalError, BadBarrierError, BadMeasurementError, BadGateError, BadEqualsError, BadParameterError, MissingSemicolonError, MissingBraceError, UnsupportedOpenQASMVersionError, BadStringLiteralError, BadClassicalTypeError, BadExpressionError, BadSubroutineError, BadLoopError, BadQuantumInstructionError, ReturnErrorConstructor, };