import type { BaseNode, Comment, SourceLocation } from 'estree'; import type { Node, ReplResult } from '../types'; import type { StepperExpression, StepperPattern } from './nodes'; import type { RedexInfo } from '.'; /** * Base type for all Stepper Nodes */ export declare abstract class StepperBaseNode implements BaseNode, ReplResult { readonly type: T['type']; readonly leadingComments?: Comment[] | undefined; readonly trailingComments?: Comment[] | undefined; readonly loc?: SourceLocation | null | undefined; readonly range?: [number, number] | undefined; constructor(type: T['type'], leadingComments?: Comment[] | undefined, trailingComments?: Comment[] | undefined, loc?: SourceLocation | null | undefined, range?: [number, number] | undefined); /** * Indicates whether this node can be contracted */ abstract isContractible(redex: RedexInfo): boolean; /** * Indicates whether a single step evaluation is possible. */ abstract isOneStepPossible(redex: RedexInfo): boolean; abstract contract(redex: RedexInfo): StepperBaseNode; abstract oneStep(redex: RedexInfo): StepperBaseNode; abstract substitute(id: StepperPattern, value: StepperExpression, redex: RedexInfo): StepperBaseNode; abstract freeNames(): string[]; abstract allNames(): string[]; abstract rename(before: string, after: string): StepperBaseNode; toReplString(): any; }