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