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