UNPKG

@akala/core

Version:
28 lines (27 loc) 983 B
import { Expression } from './expression.js'; import { ExpressionType } from './expression-type.js'; import type { ExpressionVisitor } from './visitors/expression-visitor.js'; /** * Represents a constant expression. * @template T - The type of the constant value. */ export declare class ConstantExpression<const T> extends Expression { readonly value: T; /** * Gets the type of the expression. * @returns {ExpressionType.ConstantExpression} The type of the expression. */ get type(): ExpressionType.ConstantExpression; /** * Initializes a new instance of the ConstantExpression class. * @param {T} value - The constant value. */ constructor(value: T); /** * Accepts a visitor. * @param {ExpressionVisitor} visitor - The visitor to accept. * @returns {any} The result of the visitor's visit. */ accept(visitor: ExpressionVisitor): import("./expression.js").StrictExpressions; toString(): string; }