js-slang
Version:
Javascript-based implementations of Source, written in Typescript
32 lines (31 loc) • 1.77 kB
TypeScript
import { Comment, FunctionDeclaration, SourceLocation } from 'estree';
import { StepperBaseNode } from '../../interface';
import { StepperIdentifier } from '../Expression/Identifier';
import { StepperExpression, StepperPattern, undefinedNode } from '..';
import { StepperArrowFunctionExpression } from '../Expression/ArrowFunctionExpression';
import { StepperBlockStatement } from './BlockStatement';
export declare class StepperFunctionDeclaration implements FunctionDeclaration, StepperBaseNode {
type: 'FunctionDeclaration';
id: StepperIdentifier;
body: StepperBlockStatement;
params: StepperPattern[];
generator?: boolean | undefined;
async?: boolean | undefined;
leadingComments?: Comment[] | undefined;
trailingComments?: Comment[] | undefined;
loc?: SourceLocation | null | undefined;
range?: [number, number] | undefined;
constructor(id: StepperIdentifier, body: StepperBlockStatement, params: StepperPattern[], generator?: boolean | undefined, async?: boolean | undefined, leadingComments?: Comment[] | undefined, trailingComments?: Comment[] | undefined, loc?: SourceLocation | null | undefined, range?: [number, number] | undefined);
static create(node: FunctionDeclaration): StepperFunctionDeclaration;
isContractible(): boolean;
isOneStepPossible(): boolean;
getArrowFunctionExpression(): StepperArrowFunctionExpression;
contract(): typeof undefinedNode;
contractEmpty(): void;
oneStep(): typeof undefinedNode;
scanAllDeclarationNames(): string[];
substitute(id: StepperPattern, value: StepperExpression, upperBoundName?: string[]): StepperBaseNode;
freeNames(): string[];
allNames(): string[];
rename(before: string, after: string): StepperFunctionDeclaration;
}