@akala/core
Version:
32 lines (31 loc) • 1.29 kB
TypeScript
import { AssignmentOperator } from './assignment-operator.js';
import { Expression, type Expressions, type StrictExpressions } from './expression.js';
import { ExpressionType } from './expression-type.js';
import type { ExpressionVisitor } from './visitors/expression-visitor.js';
/**
* Represents an assignment expression.
* @template T - The type of the expressions.
*/
export declare class AssignmentExpression<T extends Expressions = StrictExpressions> extends Expression {
readonly left: T;
readonly operator: AssignmentOperator;
readonly right: T;
/**
* Gets the type of the expression.
* @returns {ExpressionType.AssignmentExpression} The type of the expression.
*/
get type(): ExpressionType.AssignmentExpression;
/**
* Initializes a new instance of the AssignExpression class.
* @param {T} left - The left expression.
* @param {AssignmentOperator} operator - The binary operator.
* @param {T} right - The right expression.
*/
constructor(left: T, operator: AssignmentOperator, right: T);
/**
* Accepts a visitor.
* @param {ExpressionVisitor} visitor - The visitor.
* @returns {any} The result of the visit.
*/
accept(visitor: ExpressionVisitor): AssignmentExpression<Expressions>;
}