UNPKG

@akala/core

Version:
34 lines 1.07 kB
import { Expression } from './expression.js'; import { ExpressionType } from './expression-type.js'; /** * Represents a function parameter in an expression. * @template T - The type of the parameter value. */ export class ParameterExpression extends Expression { /** * Gets the type of the expression. * @returns {ExpressionType.ParameterExpression} The expression type constant */ get type() { return ExpressionType.ParameterExpression; } /** * The name/identifier of the parameter. */ name; /** * Creates a new ParameterExpression instance. * @param {string} [name=''] - The parameter's identifier name */ constructor(name = '') { super(); this.name = name; } /** * Accepts a visitor for the visitor pattern. * @param {ExpressionVisitor} visitor - The visitor to process this node * @returns {*} The result of the visitor's processing */ accept(visitor) { return visitor.visitParameter(this); } } //# sourceMappingURL=parameter-expression.js.map