Skip to content

yaksok.tsDocs


yaksok.ts / Scope

Class: Scope

Constructors

new Scope()

ts
new Scope(config): Scope

Parameters

config = {}

config.initialVariable?: Record<string, ValueTypes>

config.parent?: Scope

config.runtime?: Runtime

Returns

Scope

Defined in

src/executer/scope.ts:11

Properties

functions

ts
functions: Record<string, DeclareFunction | DeclareFFI> = {};

Defined in

src/executer/scope.ts:7


parent

ts
parent: Scope;

Defined in

src/executer/scope.ts:8


runtime?

ts
optional runtime: Runtime;

Defined in

src/executer/scope.ts:9


variables

ts
variables: Record<string, ValueTypes>;

Defined in

src/executer/scope.ts:6

Methods

askSetVariable()

ts
askSetVariable(name, value): boolean

Parameters

name: string

value: ValueTypes

Returns

boolean

Defined in

src/executer/scope.ts:32


getFunction()

ts
getFunction(name): DeclareFunction | DeclareFFI

Parameters

name: string

Returns

DeclareFunction | DeclareFFI

Defined in

src/executer/scope.ts:62


getVariable()

ts
getVariable(name): ValueTypes

Parameters

name: string

Returns

ValueTypes

Defined in

src/executer/scope.ts:42


setFunction()

ts
setFunction(name, functionBody): void

Parameters

name: string

functionBody: DeclareFunction | DeclareFFI

Returns

void

Defined in

src/executer/scope.ts:58


setVariable()

ts
setVariable(name, value): void

Parameters

name: string

value: ValueTypes

Returns

void

Defined in

src/executer/scope.ts:27