@qrvey/formula-lang
Version:
QFormula support for qrvey projects
69 lines (68 loc) • 2.76 kB
TypeScript
import { ErrorDictionary } from './dictionary';
import { BinaryExpressionAST, CommonAST, FunctionCallAST, FunctionParameter, UnaryExpressionAST, UnknownAST, ValidatorParameterResponse, ValidatorResponse } from '../constants/interfaces';
import { Primitive } from '../constants';
export declare class BaseError extends Error {
code: string;
message: string;
node?: FunctionCallAST | CommonAST | undefined;
constructor(code: string, message: string, node?: FunctionCallAST | CommonAST | undefined);
toString(): string;
}
export declare class GenericError extends BaseError {
constructor(message?: string);
}
export declare class FunctionError extends BaseError {
node: FunctionCallAST;
constructor(node: FunctionCallAST, errorDict: ErrorDictionary);
}
export declare class UnknownFunctionError extends FunctionError {
node: FunctionCallAST;
constructor(node: FunctionCallAST);
}
export declare class ArgumentError extends FunctionError {
node: FunctionCallAST;
constructor(node: FunctionCallAST, errorDict: ErrorDictionary);
}
export declare class ArgumentValidatorError extends FunctionError {
node: FunctionCallAST;
readonly validator: ValidatorParameterResponse;
constructor(node: FunctionCallAST, validator: ValidatorParameterResponse);
}
export declare class MissingArgumentError extends ArgumentError {
node: FunctionCallAST;
parameter: FunctionParameter;
readonly argumentIndex: number;
constructor(node: FunctionCallAST, parameter: FunctionParameter, argumentIndex: number);
toString(): string;
}
export declare class MissingParenthesisError extends BaseError {
node: FunctionCallAST | CommonAST;
constructor(node: FunctionCallAST | CommonAST);
}
export declare class UnknownTokenError extends BaseError {
node: UnknownAST;
constructor(node: UnknownAST);
}
export declare class NotAllowedOperationError extends BaseError {
node: UnaryExpressionAST | BinaryExpressionAST;
constructor(node: UnaryExpressionAST | BinaryExpressionAST);
get leftPrimitive(): Primitive | undefined;
get rightPrimitive(): Primitive | undefined;
}
export declare class TooManyArgumentsError extends BaseError {
node: FunctionCallAST;
constructor(node: FunctionCallAST);
}
export declare class InvalidArgumentError extends BaseError {
node: FunctionCallAST;
validatorResponse: ValidatorResponse;
readonly argumentIndex: number;
constructor(node: FunctionCallAST, validatorResponse: ValidatorResponse, argumentIndex: number);
}
export declare class InferredPrimitiveError extends BaseError {
expression: CommonAST;
constructor(expression: CommonAST);
}
export declare class CircularDependencyError extends BaseError {
constructor();
}