js-slang
Version:
Javascript-based implementations of Source, written in Typescript
22 lines (21 loc) • 954 B
TypeScript
import { Identifier, Comment, SourceLocation } from 'estree';
import { StepperBaseNode } from '../../interface';
import { StepperExpression, StepperPattern } from '..';
export declare class StepperIdentifier implements Identifier, StepperBaseNode {
type: 'Identifier';
name: string;
leadingComments?: Comment[];
trailingComments?: Comment[];
loc?: SourceLocation | null;
range?: [number, number];
constructor(name: string, leadingComments?: Comment[], trailingComments?: Comment[], loc?: SourceLocation | null, range?: [number, number]);
static create(node: Identifier): StepperIdentifier;
isContractible(): boolean;
isOneStepPossible(): boolean;
contract(): StepperIdentifier;
oneStep(): StepperIdentifier;
substitute(id: StepperPattern, value: StepperExpression): StepperExpression;
freeNames(): string[];
allNames(): string[];
rename(before: string, after: string): StepperIdentifier;
}