UNPKG

js-slang

Version:

Javascript-based implementations of Source, written in Typescript

26 lines (25 loc) 1.26 kB
import { Comment, SourceLocation, UnaryExpression, UnaryOperator } from 'estree'; import { StepperBaseNode } from '../../interface'; import { StepperExpression, StepperPattern } from '..'; import { StepperLiteral } from './Literal'; export declare class StepperUnaryExpression implements UnaryExpression, StepperBaseNode { type: 'UnaryExpression'; operator: UnaryOperator; prefix: true; argument: StepperExpression; leadingComments?: Comment[]; trailingComments?: Comment[]; loc?: SourceLocation | null; range?: [number, number]; constructor(operator: UnaryOperator, argument: StepperExpression, leadingComments?: Comment[], trailingComments?: Comment[], loc?: SourceLocation | null, range?: [number, number]); static createLiteral(node: StepperUnaryExpression | UnaryExpression): StepperLiteral | undefined; static create(node: UnaryExpression): StepperLiteral | StepperUnaryExpression; isContractible(): boolean; isOneStepPossible(): boolean; contract(): StepperLiteral; oneStep(): StepperExpression; substitute(id: StepperPattern, value: StepperExpression): StepperExpression; freeNames(): string[]; allNames(): string[]; rename(before: string, after: string): StepperExpression; }